Photosynthesis is an essential life process in leafy plants that uses chlorophyll to capture light energy from the Sun. Plants use this light energy, together with water sucked up from the ground and carbon dioxide breathed in from the air to create carbohydrates in which the Sun's energy is then stored, and also to give off oxygen as a byproduct, which we breathe. When animals or people eat parts of these plants that are rich in carbohydrates, then digestion passes the Sun's energy from the carbohydrates into body cells, where breathed oxygen (previously given off by plants) is used in a chemical reaction that enables life and bodily action.
All animals either gain the Sun's energy needed for life directly by eating and digesting plants, or indirectly by eating other animals that eat plants. Thus photosynthesis is the essential process in plants that makes life possible for both plants and all animals - with the exception of a few strange creatures that live at the bottom of the sea and that get their energy from volcanic fissures in a chemical process analogous to photosynthesis.
Further, when plants die and their body material eventually becomes compacted in the ground, then under great underground pressure this vegetable matter becomes highly compressed until it turns into crude oil. This oil contains the Sun's energy, originally stored in the plant's carbohydrates. After this oil is refined and turned into gasoline or diesel fuel, it is the Sun's energy that was originally captured by plants eons ago and then transferred to the oil, that is put to work in trucks' engines to move and carry food from farms to market.