The Ruger is overall a better pistol, and comes in many different flavors. The P22 is however much smaller, lighter, easier to strip, and it's easy to put a noise reducer on one.
S&W, Beretta, and Hammerli make some nice and relatively inexpensive autos too. If you want a higher quality pistol, look at a used High-Standard or S&W 41.
Some of the better .22's are the double-action revolvers are used Colts and new or used S&W's. Check out Bud's Gunshop website for new S&W.
Probably the cheapest way to get a really sturdy .22 is to get a single-action Ruger Single-Six.