Water is important for photosynthesis because it the source of hydrogen for the sugars created through photosynthesis. The simple sugars created through photosynthesis have six carbon atoms, 12 hydrogen atoms and six oxygen atoms per molecule. The source of carbon is carbon dioxide gas from the air.
Both water and carbon dioxide have oxygen atoms in their molecules, which creates an excess of oxygen for photosynthesis. Plants release molecular oxygen as a waste product of photosynthesis as a result. Each sugar molecule created consumes six water molecules and six carbon dioxide molecules, creating six oxygen molecules as waste. Photosynthesis is the primary way energy becomes available for living organisms in the vast majority of ecosystems. It is also the basic source of the materials organisms use to build their own bodies and grow, as well as the oxygen necessary for complex life.
In dry environments, plants must take special steps to protect their supplies of water for photosynthesis. This is because, in order to take in carbon dioxide, a plant's leaves must be open to the atmosphere, which permits water loss. Some plants deal with this by using carbon dioxide storage systems, sealing off their leaves during the day and only taking in gases at night.