The sun produces light through a process called nuclear fusion, which occurs when hydrogen atoms collide and fuse into helium. This process releases energy that builds up and reaches temperatures of 15 million degrees Fahrenheit in the sun's core.
Earth's atmosphere absorbs and reflects solar radiation. When sunlight enters the atmosphere, it changes direction and is refracted, which forms a virtual image of the sun during sunrise and sunset. The light also scatters more when the sun is close to the horizon, especially longer wavelengths like yellow, orange, and red, which creates colorful skies. This is due to particles in the atmosphere scattering light from the sun.
When a ray of light approaches a smooth polished surface and the light ray bounces back, it is called the reflection of light. The incident light ray that land on the surface is reflected off the surface. The ray that bounces back is called the reflected ray.
When light hits the retina (a light-sensitive layer of tissue at the back of the eye), special cells called photoreceptors turn the light into electrical signals. These electrical signals travel from the retina through the optic nerve to the brain. The brain's visual cortex processes the images and allows us to see.
The frequency of visible light is approximately 400–700 terahertz (THz), with a THz being a unit of frequency equal to one trillion Hertz. The human eye typically responds to wavelengths from about 380 to about 750 nanometers (nm), which corresponds to a frequency range of approximately 400–790 THz. However, these boundaries are not sharply defined and may vary per individual.
Of course it is all a lot more complicated than this but this gives us a simple understanding of what is happening. The main thing is light is filtered and light is reflected. The primary colors are different for filtered light and reflected light.
If you want to know more I have a text book here on the eyes and how we are able to perceive what we see.
View attachment 350643