Photosynthesis is a process by which plants, algae, and some species of bacteria, produce their own food. That however, doesn't mean it is only helpful for plants, algae and species of bacteria which are directly involved in it. More than being helpful, it is a necessity for humans and other animal species which can't produce their own food, but instead rely on the products of this process to meet their energy requirements and for the process of respiration.
While the definition of photosynthesis - which states that it is a process by which plants prepare their own food using sunlight, carbon dioxide and water, is most often restricted to elementary books, a technically sound definition of the same states that it is 'a process wherein phototrophs use energy derived from the Sun to convert carbon dioxide and water into organic matter, which is eventually used for cellular functions such as biosynthesis and respiration'. Phototrophs here are organisms - plants, algae and bacteria, with the ability to carry out photosynthesis to derive energy.
As you get to see in the aforementioned definition, carbon dioxide, water and sunlight are the three major requirements of this process. Carbon dioxide available in the atmosphere is absorbed by plants through their leaves i.e. the tiny epidermal spores in their leaves - known as stomata, to be precise. Similarly, water is absorbed by their roots from the ground, and transported to the site of photosynthesis process in the leaves, via the stem. Sunlight - on the other hand, is trapped in the leaves by a green pigment present in them. Referred to as chlorophyll, this is the same pigment which gives the leaves their characteristic green color. The reaction which follows is depicted as:
In this equation, carbon dioxide, water and sunlight are the reactants which are present at the start of the reaction, while glucose and oxygen are the products of this process.
Products of Photosynthesis Process
As you can see in the photosynthesis equation given above, the two main products of this process are glucose and oxygen. The water which is absorbed by plants is converted to hydrogen and oxygen by using energy derived from the Sun. While oxygen is released in the atmosphere through the stomata as a bi-product, hydrogen is used by the plants to prepare their own food. On the other hand, glucose is produced and stored in the complex molecular structure of the plant cell. The same acts as the source of energy for living organisms, and is transferred from one organism to another as a part of food chain energy transfer. When a herbivorous animal feeds on plant, energy is transferred from plants to this herbivore; and when a carnivorous animal feeds on this herbivore, the same is transferred on to it. On the other hand, omnivores feed on both plants and animals, and hence derive energy from both these sources.
Of all these products, hydrogen is by far the most useful for plants as it is used by them to prepare their own food. Similarly, oxygen - which is released as a bi-product of this process, is the most useful for humans and other living beings. While oxygen is necessary for the process of respiration, glucose plays a crucial role in the diet; and that explains why the photosynthesis is important for all the lifeforms on the planet - including humans.
PS: Even though plants require carbon dioxide to facilitate photosynthesis, too much of the same and other pollutants in the atmosphere can block the stomata, and adversely affect the entire process.