Chlorophyll the pigment gives the plant their green color and let's them absorb sunlight more of Chloroplast a part that is cell found in plants that coverts light energy into energy plants which use "Sugar".
If this is wrong let me know and I'll help you the best I can enjoy and have a nice day!
It's cause of the plastids present in them, there are 4 types of plastids, leaucoplasts-they are colorless, chloroplast -the green color of plant is due these plastid and chromoplasts-for red, yellow and orange colour, I hope this helps you, for more info feel free to message