The solar panels you put on your roof are should last for 25 years. You want your roof to outlast your panels, so that you don’t need a new roof during the lifetime of the panels. In general, this means that your roof should be less than ten years old.
That said, the portion of the roof under the panels has its aging process greatly reduced, since the array protects the roof. An array that covers an entire roof will increase the roof’s lifespan.
Removing and reinstalling the solar array to reshingle the roof might add about $1,500 to the cost of the job.