Forests act as giant buffers against extreme temperature swings, cooling on the hottest days and warming on the coolest ones.
Cooling in summer and hot climates:
In hot climates and in hot summers of temperate climates, forests release huge volumes of water through evapotranspiration. This release of water into the atmosphere has a huge cooling effect. Forests also reduce heat by directly capturing useful solar energy, and converting it into stored energy that is used later by plants and animals. The energy captured by photosynthesis is all energy that would either become heat or be reflected (some of which would later become heat) if it were not for the plants capturing it.
Tall forests also block out a great deal of heat from reaching the ground. The highest trees capture most of the sunlight, and the hottest air stays at the top of the forest and rises out, leaving the forest floor moderate in temperature.
Warmth in winter:
In areas with cold winters, forests also generate heat in the winter. Plants burn a substantial portion of their stored energy in the winter, to keep themselves alive, and the animals in the forest also burn up their own energy stores. All of this respiration generates heat.
Forests also increase heat capture by the sun on days when the ground is covered by snow.
An open field covered by snow reflects most of the sunlight that reaches it. But a forest captures most of this light--especially a boreal forest consisting of mostly evergreen trees. The conical shape of evergreens shunts off most of the snow onto the forest floor, leaving the treetops exposed. The dark color of the evergreen trees' needles captures solar radiation as heat, warming the landscape to a higher temperature than an open field would be in winter.