You can actively identify if your windows need to be replaced by being aware of the following:
You notice fog, condensation, or moisture on your glass consistently. When the view through your window becomes hazy like this it usually indicates that a seal has failed.
Certain areas of your home become faded from where the sun enters the window. This could be furniture, carpeting, or even hardwood and it means you need to upgrade windows because your current models are allowing harmful UV rays to enter your home.
Your current windows are not rated for the new climate regulations. Colder climates require a higher ER rating to satisfy energy efficiency recommendations. Your windows are grandfathered in and a replacement isn't mandatory, but just know the amount of energy you are losing by having these lower quality units installed.
If your windows are having difficulty opening, closing, and locking it could be time for replacement windows or at the very least a repair. Having a window that doesn't properly open is a violation of building codes and is a huge safety risk in case of a fire.
Rotting or pealing wood means the windows are past their prime and ready for replacement. The older your windows are, obviously, the more likely this occurrence will be.