The substance that gives plants green color is chlorophyll.
Chlorophyll is a chemical found in organelles called chloroplasts in the cells of green plants. The chlorophyll uses the energy from the sun to produce glucose and oxygen from carbon dioxide and water in a process called photosynthesis.
Chlorophyll uses mainly light in the red/yellow and bluish regions of the spectrum. There are many different types of chlorophyll.
Generally plants have green colour due to presence of chlorophyll. But when 'Mg' is lost from the chlorophyll molecule,it loses its colour. In some plants, Mg is replaced by 2 hydrogen atoms.
The formula for chlorophyll 'a' is C55H72O5N4Mg, but there are other types of chlorophyll such as chlorophyll b, c,d .. etc, present in different plant groups such as Xanthophyceae, Rhodophyceae etc.
Chlorophyll reflects green light, so plants are seen as green in colour
Assuming you're asking why the leaves in plants are green, the reason for this is because plant cells contain an organelle called chloroplast that contains Chlorophyll, which is green in appearance. Chloroplast is used in the process of photosynthesis to create energy.
The green color in plants is due to chlorophyll. Chlorophyll is an important biomolecule that allows plants to absorb energy from light.