the process by which green plants and some other organisms use sunlight to synthesize foods from carbon dioxide and water. Photosynthesis in plants generally involves the green pigment chlorophyll and generates oxygen as a byproduct.Also During the process of photosynthesis, cells use carbon dioxide and energy from the Sun to make SUGAR molecules and oxygen. These sugar molecules are the basis for more complex molecules made by the photosynthetic cell, such as GLUCOSE.
The distance from the Sun allows for the right amount of light absorption, allows the right intensity of heat, and the gravitational pull of the sun on the earth keeps it from going out into outer space.