Photosynthesis occurs only in some bacteria such as cyanobacteria, which is a diverse group of cyanobacteria. They are also known as blue-green bacteria.
In higher-order plants, photosynthesis occurs in the chloroplast. Bacteria do have chloroplasts. However, cyanobacteria possess the photosynthetic pigment chlorophyll in flattened sac-like structures called thylakoids, which are present in the cytoplasm. The presence of chlorophyll allows cyanobacteria to perform photosynthesis and produce the energy they need from sunlight and carbon dioxide.