Solar panels have been installed on the roofs of two swimming pools to help reduce energy bills and carbon dioxide emissions.