You can look for many different signs that you have an over-the-hill air conditioner ready for a replacement. General age is a good measure: most ACs don’t last far beyond 15 years. You can also watch for declines in efficiency that create higher electric bills, or a run of expensive repairs that indicate a system approaching the end of the line.
One sign it’s time to repair your AC that is absolute is if it’s an R-22 unit. If you have an R-22 air conditioning system, arrange to have a replacement put in as soon as you can—otherwise, it will force you to replace it at some point when it’s much less convenient for you.