Panel life is determined by a variety of factors, including climate, module type, and racking system used, among others. While there isn't a specific end date for a panel per se, loss of production over time often leads to equipment retirements.
The best way to decide if you should keep your panel running for 20-30 years in the future, or upgrade it, is to measure output levels when choosing panels.
If you are looking to buy a panel that will be installed on a roof, you might need to pay close attention to the rate of decrease in efficiency over the period of time.