Depends on what you're switching into and how you're playing.
Solid Rock can switch into any physical attacker easy, take many hits, and usually KO the opponent.
Sturdy lets it take one hit, hit back and then die.
Solid Rock is probably the better option, especially in-game, but sturdy can be used to -
Take a hit with sturdy instead of letting something else die, and aqua jetting (or a more powerful move if the other Pokemon is slow) to kill it. This may save your tanks from being KO'ed by sweepers.
Hope I helped.