The light radiation of higher wavelengths deviates the most. In visible range blue or violet colour has the shorter wavelength therefore it scatter most whereas red has the longest wavelength in the visible spectrum of the light so scatter the least.
During sunrise and sunset, the rays have to travel a larger part of the atmosphere because they are very close to the horizon. Therefore, light other than red is mostly scattered away. Most of the red light, which is the least scattered, enters our eyes. Hence, the sun appears red.