Photosynthesis is the pathway used to synthesize carbohydrates from sunlight and carbon dioxide. In addition, it is the procedure by which green plants and some other entities use sunlight to produce foods from carbon dioxide and water. In plants in general encompasses the green pigment chlorophyll and produces oxygen as a by-product.