After 30 years, most solar panels will only operate at around 80% or less of their original efficiency, meaning they’ll produce less electricity.
But that’s not to say you can’t keep using them after that point. If your solar panels are still producing enough electricity to meet your needs, there’s really no reason to replace them.