At the time of sunrise or sunset when the sun is near the horizon, the sunlight has to travel the larger distance through the atmosphere to reach us. During this long journey of sunlight, most of the shorter wavelength blue-color present in it is scattered out and away from our line of sight. So, the light reaching us at the time of sunrise and sunset consists mainly of longer wavelength red colour due to which it appears to be red.