The blue colour of the sky is caused by the scattering of light. The scattered blue light also reaches our eyes. This gives rise to the blue colour of the sky. Color of a star is determined by its surface temperature. Our sun have a surface temperature of between 50000C to 60000C, so the sun gives yellow light and appears yellow. Also, it appears red at the time of sunset/ sunrise. Here is more atmosphere towards the horizon. As the sun sinks lower in the sky, the light has to travel farther through the atmosphere before it reaches our eyes. When the sunlight meets more air molecules, the blue light gets scattered away and the reddish constituent of white sunlight reaches our light as it faces no scattering due to its longer wavelength.