During photosynthesis, plants release oxygen as a byproduct of the light-dependent reactions. When chlorophyll absorbs light energy, water molecules are split (photolysis) in the thylakoid membranes, releasing oxygen as a waste product. This oxygen comes from water, not from carbon dioxide, which is used in the subsequent Calvin cycle to produce glucose.