Let’s say you went solar today and then a few years later want to re-roof. Well, it’s not that pricey to pop the panels off, re-roof, and then put them back on. Often, the amount of power expenses you could have saved during that time is worth more than waiting to do the two things simultaneously.
If you’re going to do your roof this year anyway, go ahead and coordinate with a roofer and do both at the same time (it is commonplace for solar installers to coordinate like this). Otherwise, just pull the trigger on solar and worry about the roof when the time comes.