Around 400 schools and hospitals are to get new rooftop solar power thanks to a £200m investment from Great British Energy.