Forests fulfill many functions related to climate. They retain water from the rains, a process known as the sponge effect, which allows a more humid and fertile soil. In deforested soils, the water from the rains runs off more easily, which can lead to floods in the surrounding areas, and also decrease the soil quality even further.
On the other hand, they also help with the greenhouse effect by fixing the carbon on the carbon dioxide into organic molecules through the process of photosynthesis, reducing, in this way, the excessive temperature increases.
Areas where deforestation has occurred, usually have dryer soils and higher temperatures in consequence of the mentioned above.