Solar panels typically have a 20 year warranty, and are guaranteed to output 80% of their power at year 20 (these figures are required to be met in order for the systems to qualify for tax incentives, so they're pretty common amongst manufacturers). They'll most likely continue working after the warranty. I will, however, probably have to replace my inverter every 10 years or so. It looks like I can pick up a new one on ebay for around $2000 right now. I'm hoping the cost of these drops over time or the technology improves such that my next one is more reliable.
As for ROI, my break even was only 5-6 years. In Southern California we pay dearly for electricity (over 30 cents per kWh once you get past some scant "baseline"), but we have plenty of sunshine. It's been almost 3 years now. The estimated savings for my $15k investment was projected at $100k or so over 20 years. I feel they're using too high of a percentage year-over-year increase of utility power, but even if I only make half that, it's still a good investment.
I did opt to buy instead of a pre-paid lease. The salescritters promised that the leasing companies would effectively gift me the system for $0 at year 20 because it would be too costly to remove, and that the real money was in the accelerated depreciation in years 0-5. However, if I think of the solar panels as a money printing machine, it seems unlikely that the panels, even if they're 20 years old, would have a fair market value of $0. No business would give away something that they can get money for, so I have to assume that at year 20 they will do something to ensure they continue to get a profit from the system that they legally own on my roof. Forget that uncertainty, I decided to just buy it so there are no unknowns. I think it will be really fascinating to see what happens to all of these ultra-long leases in the 2032 time frame.