Most states have laws that require the former owner to make claim of any serious faults with the property you purchase. If these solar heaters leaked when the previous owner was there, that party can be held reponsible to make good from these faults.
However I think you are on firm ground to do an emergency repair to stop the leak and halt the additional consequential damage - and include that cost in your claim. (Bringing it back into operation might be a different matter.)
Also: You may have a claim against the inspector. In addition to any legal recourse, many inspection companies give a guarantee - meaning they'll pay for the fix of anything they passed as OK when it was really broken.
First check your inspection paperwork to see what their warranty terms are and if they did some "not included" weasel on the panels (or actually reported them as defective - in which case you're hosed both with them AND possibly with the seller). Then check with them (and then your lawyer if they don't immediately give satisfaction.) They'll want to look at it and proabably have a list of contractors they trust to do the repair and not overcharge them for it (or give them a discount for the referrals.)