Stomata allow for intake and output of gasses, mainly CO2 and O2. During photosynthesis, air spaces can build up within the plant. This causes a problem as the oxygen can oxidize enzymes and reactants within the photo-systems involved in photosynthesis and reduce efficiency of photosynthesis.Hence, Oxygen must be expelled and CO2 taken into the leaves to continue the cycle at an efficient level. The stomata serve the purpose of gas exchange by maintaining the balance of these two gasses, allowing the plant to continue producing glucose from photosynthesis. Since sunlight is required for photosynthesis and sunlight is lacking at night time, stomata are open during day time.