When should a wheel be replaced? I an not talking about upgrading. How do you know when to buy new wheels because the other ones have worn out? How do you tell a wheel is worn out? I can always true a wheel back to true. And nothing is dented, but the maintenance is getting a little more than it should be.
At some point the spokes become too fatigued and start snapping.

At some point, with rim brakes, the rim wears through until it's no longer stable.

At some point the bearing races in the hub become too worn.

Of these, only the third reasonably demands that the wheel be replaced -- wheels with worn spokes can be relaced, and rims can be replaced without relacing.  But in some cases, especially if more than one of the above problems is looming, it may be more cost-effective to replace the wheel rather than repair it.

And, of course, there's always the case of some sort of actual damage to the wheel -- ripped spoke holes in the flange, bent flange, "taco-ed" wheel where both spokes and rim will need replacing, etc.