Bacteria that can utilize sunlight to produce their food are known as photosynthetic bacteria.
They are prokaryotes (cells lacking a nucleus and well-defined membrane) that can process the available inorganic raw materials to convert light energy into chemical energy.
They contain chloroplasts and blue-green pigments, which assist them in the photosynthetic process.
Examples of photosynthetic bacteria are Cyanobacteria, Chlorobi (green sulfur bacteria), Proteobacteria (also known as purple bacteria), and Chloroflexi (filamentous bacteria also known as green non-sulfur bacteria), Proteobacteria (also known as purple bacteria), etc.