Solar panel lifespan (brief)
What we do know today is that a panel will continue to lose about 0.5% efficiency each year over it´s lifetime, and this is what makes solar panels manufactured today, come with a warranty that guarantees an energy production off at least of 80% efficiency, 25 years into the future. If it drops below that during that period or gets broken you can get a new one.
Since we have now moving parts, limiting factors to this lifetime is hail, rain/moisture and the wear and tear from the suns ray itself. Today’s solar panels are as water-resistant as possible and are covered with glass that is designed to withstand even heavy hail storms, but solar radiation ultimately limit their lifespan.
Studies on the lifespan of solar panels concluded an expected lifetime of 20 to 25 years. Since we only have been using solar panels for a short period of time, no-one can give a definite answer. The panels produced today may be more efficient and cheaper to manufacture, but only the future will tell how long they really last, so its a good idea to check for a warranty on the solar panels that you are considering for your home.
Sources (more info):
http://www.sciencedirect.com/science/article/pii/S2211379716301280
https://greentumble.com/how-long-do-solar-panels-last/
https://www.nrel.gov/docs/fy12osti/51664.pdf