It depends, the 155 and 165 typically have both more energy and momentum than the 180 grain in 40 S&W. The 155 grain 40 S&W has roughly the sectional density of a 200 grain 45 ACP and the 180 grain 40 S&W has about the same as the 230 grain 45 ACP.
Most name brand JHP 155-180 will work well for defense, make sure they feed and function reliably in your firearm. I'd recommend against any of the the specialty super ultra advanced this will stop a BG but not go through drywall ammunition, they are expensive and drywall is incredibly easy to penetrate, something that will penetrate a threat enough to stop a threat and not go through drywall is hard to achieve.
There are some factors that can make a difference, the bullet construction / shape, the same weight bullet at the same velocity from different manufacturers can sometimes have significant penetration differences, and barrel length, also how closely claimed velocity of the bullet matches your firearm.
Two things to look at are energy and momentum, energy is published on the boxes but momentum isn't. Unfortunately energy doesn't really tell you that much, bird shot leaves the barrel at a high rate of speed but because it is low in mass it has very little momentum and doesn't penetrate well.
Momentum is easy to calculate though, (weight of bullet / 7000) * velocity and can be a better predictor of penetration, it also shows why heavier bullets of an acceptable velocity tend to penetrate better.
155 grain bullet traveling at 1175 FPS (Gold Dot) has:
Energy: 475 ft/lb
Momentum: 26.01
A 165 grain bullet traveling at 1150 FPS (Gold Dot claimed) has:
Energy: 484
Momentum: 27.107
A 180 grain bullet traveling at 985 FPS (Gold Dot claimed) has:
Energy: 387 ft/lb
Momentum: 25.3
In this case assuming the above velocities are true the 165 has both an energy and momentum advantage.