A plant needs to open its stomata to let in carbon dioxide for photosynthesis
this also lets water out - there's a higher concentration of water inside the leaf than in the air outside, so water moves out of the leaf down the water potential gradient when the stomata open.
So transpiration's really a side effect of the gas exchange needed for photosynthesis.
the lighter it is the faster the transpiration rate. This is because the stomata open when it gets light (the lighter it gets, the wider they open). When it's dark the stomata are usually closed, so there's little transpiration.
the higher the temperature the faster the transpiration rate. Warmer water molecules have more energy so they evaporate from the cells inside the leaf faster. This increases the water potential gradient between the inside and outside of the leaf, making water diffuse out of the leaf faster.
the lower the humidity, the faster the transpiration rate. If the air around the plant is dry, the water potential gradient between the leaf and the air is increased, which increases transpiration rate.
the windier it is, the faster the transpiration rate. Lots of air movement blows away water molecules from around the stomata. This increases the water potential gradient, which increases the rate of transpiration.