The loss of excess water by diffusion through the stomata of leaves of a plant into the atmosphere is called transpiration.

The main functions of transpiration are:

Removal of excess water
Large quatities of soil water are absorbed by the root hairs. However, only a small quantity of water is used up. Most of the excess water and the water produced from cell respiration is transpired out of the plant

Exerts a cooling effects on plants
When a plant is exposed to sunlight, its temperature increases which would be harmful to thhe cells. Transpiration helps in the removal of latent heat. As the water transpires, heat is used up, the plant temperature decreases and it experiences a cooling effect.

Uptake of mineral salts and maintenance of water balance
Loss of water from the mesophyll cells has the effect of turning its cell sap into a stronger solution. The increases its concentration and results in a flow of water by osmosis into the more concentrated cells. Therefore, transpiration concentration of the cell sap and increases the uptake of dissolved mineral salts.

Maintain a certain moisture level in an environment

It helps maintain a certain moisture level in an environment, depending on the number and types of plants in an environment. This allows some organisms to survive better than others depending on the moisture levels that they need to thrive.