Not a chemical reaction but several. The cells within a plant are able to convert water into oxygen gas and hydrogen ions and electrons. The gas leaves the plant while the other two proceed to produce ATP and other compounds. Since ATP is a very short lived energy source and plants need sugar, then this energy along with the hydrogen, carbon dioxide, and other carbs start forming chains of carbon that eventually lead to sugar in something called the Calvin Cycle. A small amount of water is also released by this part of the reaction but is never shown in net formulas because it takes more water to make sugar than the production of sugar releases.
Regardless, if you were looking at the net equation, you'd see 6 CO2 + 6 H2O ---> C6H12O6 + 6 O2