Transpiration is the process by which plants perspire water as water-vapour into the atmosphere through their stomata.
Plants absorb water and minerals from the soil with their roots. These are then transported to the leaves through the xylem. In the green leaves, carbon dioxide and water combines to form carbohydrates within the chlorophyll, in presence of sunlight, by photosynthesis. While sunlight is harnessed for this process, water is also vaporised in the heat and is lost as vapours through the openings in the leaves.
When water is vaporised, all the dissolved subtances in water do not vaporise along with it. Only the water molecules vaporise. Thus the water that is transpired is completely purified. The purified water vapours can be condensed to give pure water.
Transpiration bags can be used to collect the purified water that gets transpired from leaves.