And just like solar panels, trees harvest a part of the energy in sunlight, giving additional cooling to just a shade. And trees are cheaper to set up, even if they may not provide a return on electricity.
Ideally you would have trees on the ground and solar panels on the roofs, to further increase cooling.