There are a variety of pigments used for photosynthesis.
In green plants – chlorophyl alpha and beta.(green)
In Cyanobactera (a class of bacteria) – Phycyanin.(blue-green)
In Red algae – Phycoerthyrin.(red)
Uses of pigments:
They can absorb light energy of specific wavelengths. The light that we see can be split roughly into 7 regions seen during a rainbow. Violet, Indigo, Blue, Green, Yellow, Orange and Red. So each pigment can absorb one of these regions.
Light energy gives 1 photon to the pigment which behaves like an antenna, which is transfered to other structures, which directs the energy towards production of ATP(transfer of energy in living cells is done with ATP)