Many plants, protists, bacteria and cyanobacteria can carry out photosynthesis. These organisms produce sugar, lipids and proteins by harvesting energy from sunlight. Photosynthetic organisms are producers because they produce their own food.
In plants, most photosynthesis occurs in the leaves and, specifically, within the chloroplasts where the stroma and the thylakoid membranes are the sites of most activity. The stroma is a fluid layer where carbon dioxide from the air becomes sugar. The thylakoid membranes convert light energy into chemical energy. A green pigment, chlorophyll, absorbs light energy from the sun. In the end, plants produce oxygen as a photosynthetic byproduct.
Some plants, such as the ghostly white Indian pipe, do not require photosynthesis. The Indian pipe obtains nutrients by parasitizing fungi. Cyanobacteria, or blue-green algae, get their name from phycocyanin. Phycocyanin replaces chlorophyll in these organisms, and photosynthesis takes place in the folds of the cells' outer membranes rather than in chloroplasts. Some photosynthetic protists, like euglena, contain chloroplasts as do plants. Others, like the dinoflagellates, host endosymbiotic organisms or obtain chloroplasts from prey they consume. Bacteria often contain bacteriochlorophyll. This compound resembles chlorophyll but absorbs light of slightly longer wavelengths. Unlike plants, many bacteria do not require water for photosynthesis to occur. Because of this, they do not produce oxygen.