If your main concern is shooting photos, then the D90 is still one of the best cameras out there for the price. The D90 has an internal auto focus motor, so it has greater lens compatibility than the D5100. The D90's High ISO performance is great. I use the D90 as my primary body and I love it. I have also used the T3i and I prefer the D90's low light performance to the T3i's resolution. Picking up a used or referb D90 is still a good idea because the newer cameras around the same price do not beat the D90's features and performance in a significant way. The D90 is a great stepping stone to the higher end Nikon Line and will work with the same accessories.
Now the bad news. The D90's Video capabilities are lack luster. It will shoot 720p, but its is Motion JPEG, not the much better AVCHD or MP4. If being able to shoot high quality video is a must for you, then stay away from the D90, the newer D5100 or Most Canon cameras will do a better job. If being able to shoot video is just a nice to have feature, then the D90 will do it.
The bottom line is, you cannot go wrong with a T2i, T3i, D5100, or D90, they are all great cameras. The D90 is getting fairly old at this point, but Nikon still lists it in their line up and still sells it, and for good reason.
Look at a sensor comparison here:
www.dxomark.com/index.php/Cameras/Compare-Camera-S...
Clicking the mark as good answer button helps us highlight the best answers.