Hundreds of solar panels are to be fitted to council-owned community centres to cut energy bills and free-up money for activities and local people.