Solar panels have no moving parts, so as long as they remain sealed they can work. The typical manufacturer's warranty on a solar panel is 25 to 30 years, but panels can last up to 40 years with care and attention.
Problems may occur in a solar panel if the seal cracks and water leaks in. This may cause the contacts to corrode, causing poor conductivity.
If the solar panel is dropped, trodden upon, or otherwise abused, it will stop working. Solar panels are designed to be installed and then left alone except for cleaning. Most solar panels are rated to withstand hail and heavy rain.
Blocking diodes in a solar panel isolate parts of a panel that don't work (for example, if a cell were to fail). Thus, safeguards are built into the average solar panel to ensure its longevity.
A household solar power system might require other equipment. For example, a solar controller that regulates the charge between the panels and the battery may be needed. Take note that such equipment will have its own warranty.