Photosynthesis is the process by which plants and some bacteria convert sunlight into chemical energy in the form of sugar, using water and carbon dioxide while releasing oxygen. It is critical for life on Earth, sustaining ecosystems and providing energy for various biological functions, and is facilitated by structures such as chloroplasts and specialized leaf anatomy. The process involves light-dependent reactions occurring in the thylakoids and light-independent reactions (Calvin cycle) occurring in the stroma, and various factors like light intensity, carbon dioxide concentration, and temperature affect its rate.