There are two reasons.
First, Because they need to absorb certain colors of light.
During photosynthesis plants use the light hitting them to excite electrons. They then use the energy of those excited electrons in a series of reactions to store that energy as sugars like glucose.
For this to happen most effectively there are specific colors of light the plants “want” to absorb, because since different colors of light have different energy levels which excite the electrons to different energy levels, certain colors excite the electrons just the right amount. Those happen to be in the blues and reds, since the plant doesn’t need the green light, it’s reflected away.
Also. Fully black leaves could absorb TOO much sun and overheat the plant.
Plants can also overheat and get burnt by the sun, if they were black they would absorb even more light and really heat up on a hot sunny day. Like when you wear a black shirt out instead of a light colored or white one.
While plants harvest energy from sunlight to perform photosynthesis, they don’t absorb *all* sunlight. In an ideal world, they would, and it would allow more efficiency, but we do not exist in an ideal world and they are stuck with the best they can do.
It happens that the chemicals plants use to harvest light work best for red and blue light, leaving the green to escape and giving them that distinct color.
Green carries the least energy in the light spectrum, plants are green to reflect the green wavelength. They absorb most other wavelengths to produce energy in the form of sugars. This is also a unique quirk of our star as within other solar systems if there where life like plants the stars spectrum could be different and the plants could be any colour. Black plants on earth would likely overheat
The prior three answers did a good job on Photosynthesis. But your question asks something about absorbing sunlight. Photosynthesis is powered by light, reflecting ( bouncing off) the plant cells and not absorption of the light. A good example here is when you use a microwave it cooks food by reflecting microwaves and adding energy to water in your food. If you touch the inside of the microwave it is fairly cool compared to the hot food. However if you use an oven the food absorbs the energy to get hot, the inside of the oven is very hot.
Well, to Explain Like You Are Five.
Light has a spectrum of colours. The colours needed to power photosynthesis lie at the Red end and Blue end of the spectrum. The part of the spectrum that is not needed is Green. That light is reflected. That is why the plant seems green. Green Light is being reflected.
Plants (and even phytoplankton and seaweed!!) get their colors due to pigments made in chloroplast (found only in photosynthesizing organisms) like chlorophyll, xanthophylls, carotenoids etc.. in addition to those phytopigments plants get their colors based on the type of light they absorb. It’s nice to think that the color you’re seeing on a plant is the light being reflecte and not absorbed for photosynthesis.
Latest Answers