For t-shirts, whenever my wife throws them away. I still have some from HS. Most of 'em are in bad shape, so they're for working around the house or cooking.
Dress shirts tend to last me about 5-7 years. I stick to Brooks Brothers non-iron shirts, since they last a very long time without fading or having the non-iron-ness wear off. I try to buy a few each year when they go on clearance or they run a good sale (meaning 30+% off, like the semi-annual sale stacking w/ corporate discount). If you can get 'em for around $50 a shirt, it's a steal, but at their normal $70 or so, still a tremendous value. No dry cleaning, and they last forever.