Many manufacturers of photovoltaic solar panels offer some sort of warranty that is valid for 15 to 25 years. Many people suggest that after that period of time, a replacement of the panels is necessary
The lifetime of solar panels (photovoltaic panels) on average ranges between 20-25 years – different solar panel companies may give different guaranties for the performance and operation of their solar panels.
PV panels can last up to 25 years or more, some with a maximum efficiency loss of 18% only, even after 20 years of operation.
Both suggesting that there is about a 20 year lifetime and then you have to replace your solar panels.
I am skeptical that something that works 20 years would, all of a sudden, stop working and require replacement. I expect that a non-mechanical device has little wear-out. That's why there is a relatively long warranty period. For that reason, it is not reasonable to expect much performance loss over time. I expect that even after 20 years, a solar panel will still generate at least 80% of its initial performance which really makes me wonder about why a replacement should be necessary.