What goes in, what comes out
The simplest useful summary is: carbon dioxide + water + light energy → glucose + oxygen. Written as a balanced overall equation: 6 CO₂ + 6 H₂O + light → C₆H₁₂O₆ + 6 O₂.
This equation is a summary, not a single reaction. Light is absorbed by pigments such as chlorophyll. Part of that energy is used to split water and drive electron transfers; carbon from CO₂ is then incorporated into organic molecules.
Where do the atoms come from?
The carbon atoms in glucose come from carbon dioxide. The oxygen released as O₂ in oxygenic photosynthesis comes from water, not directly from CO₂. That distinction is easy to miss in a simple diagram.
What happens to the glucose?
Glucose is not merely an end product. Plants can use it for respiration, convert it into starch for storage, build cellulose for cell walls, or use its carbon skeletons to make many other organic molecules.