What is photosynthesis? It is the process by which plants convert solar energy into chemical energy. Scientists have been studying this process for decades. One of the questions you want to answer is: Why are the plants (mostly) green? Why not a different color?
Solid land plants come from underwater developed organisms. We find aquatic photosynthetic organisms in many colors. Green, brown, red and yellow … But why does green predominate out of the water? It has to do with the intensity of sunlight over time. It wasn’t always that intense. The number of photons that reached the planet was very different (the brightness of the sun increased significantly at the beginning of its history). The filtering of light by the atmosphere also changed. Oxygen and ozone are two missing components in the early atmosphere. The effect of water filtration on the amount of light that reaches the sea is another important factor.

Capture photons
Sunlight is rich in red light photons. Not so much in the most energetic photons, the blue ones. The medium-energy photons (the green ones) are neither very energetic nor abundant. Chlorophylls are molecules that are responsible for the color of plants. And above all, they are the real “inventors” of photosynthesis. They “focus” on capturing the part of the most common solar spectrum (red) and the most energetic (blue). So we see green chlorophylls. They are real antennas with an optimal alignment to capture the characteristic light types of the sun. Other aquatic photosynthetic organisms have a different pigment repertoire. They record the spectrum of the sun that penetrates the water. But it was the photosynthetic organisms that conquered the mainland that best captured the sunlight that reached the planet.

Other suns
But what would have happened if our planet had orbited a star with different light properties instead of the sun? Maybe we would be populated with blue or even black plants. What would it depend on? For example, whether these planets are near an F-type star. These emit a lot of blue photons and the plants would have to be protected with pigments of this color. Or if it is a type M star (a red dwarf). It would have a very dim light. It would prefer plants that can capture all types of photons (ie black).
Despite all of this, the final answer to the question may be different. Why are the plants green? After all, it could have happened by simple cosmic coincidence.