This is because of scattering of light. Light from the Sun near the horizon passes through larger distance in the earth’s atmosphere before reaching our eyes. So, most of the blue light and shorter wavelengths are scattered away by the particles. Therefore, the light that reaches our eyes is of longer wavelengths. This gives rise to the reddish appearance. But during the day shorter wavelengths are scattered more by molecules of air and the scattered blue light enters our eyes.