Bark of trees keeps surface cool by minimising the absorption of solar light and maximising thermal emission through tannins.
Bark of trees have a rough surface constructed of scale structures called tannins. These scale structures reflect sunlight and dissipate heat from the sun through the properties of tannins that achieve cooling down by reflecting light between 0.7 and 2 microns and radiation emitting between 6 and 10 microns.
These two properties, mainly provided by tannins, create optimal conditions for radiative temperature control. In addition, tannins seem to have adopted a function as mediators for excitation energy towards photo-antioxidative activity for control of radiation damage. Optimal reflection of incoming radiation is not the only condition for keeping surfaces cool.
Many tree barks show a paper-like structure with sheets peeling off, generating highly heat-insulating, trapped air spaces between them such as birch and paper-bark tree. Other tree barks have developed a very rough surface that produces a lot of shadowed areas amongst the illuminated ones. Such a morphology is known to stimulate convection of air, which then transports away heat from the bark surface. An additional fact or that has been considered by evolution was, as already mentioned, the structure of tree stems and branches. They typically have a round profile, minimising the surface with respect to the volume. For that reason, comparatively little solar heat can come in from the outside.
Henrion, W. and Tributsch, H. (2009). Optical solar energy adaptations and radiative temperature control of green leaves and tree barks. Solar Energy Materials and Solar Cells, 98: 104-5.