Combination solar thermal panels have a fluid within them that heats up and is sent back to the house for various heating purposes. After the heat transfer, cooler fluid returns to the panel, effectively cooling it. Another option (for ground-mounted solar panels, not on the roof) is to raise the panels slightly higher and cultivate shade-tolerant plants beneath them. The evaporation from the plants helps cool the panels.