How long a solar panel is useful depends on performance which degrades overtime due to exposure to the environment, the rate is low and after 30 years in many locations it is cost effective to replace the panel to increase power output. However the rate in hot humid locations is higher, due in part to lightning, replacing after 15 years might, in such places make sense.