Photosynthesis; 6CO2 + 6H2O (+ light energy) C6H12O6 + 6O2
It is used in photosynthesis, which turns sunlight, carbon-dioxide, and water into food the cell can use. Go to Wikipedia and search photosynthesis for more information.
To make food
The plant uses carbon dioxide, water and light to produce oxygen and sugars.
To make glucose and oxygen.