Solar panels are built to keep generating electricity for decades, but their lifespan depends on panel quality, degradation rates and how well the system is maintained