During the day, photosynthesis is faster than respiration, leading to carbon dioxide moving into the leaves and oxygen moving out; at night, respiration happens but photosynthesis doesn't, causing carbon dioxide to move out of the leaves and oxygen to move in