Photosynthesis is a process by which plants produce sugars (such as glucose) and oxygen (O2) from water and carbon dioxide (CO2).
This process occurs in the chloroplast of the plant cell, the chloroplast captures energy from the sun to energize electrons from water; these electrons provide the energy to convert CO2 into carbohydrates (oxygen is previously released from the water).