When a light wave falls on a tiny particle , the particles scatter the light wave in different directions of light. This is called Scatteringof Light . The scattering of this light produces light of different wavelengths and hence different colors emerge. Also know that blue light has the shortest wavelength and is the most diffused and red light has the longest wavelength. During sunrise and sunset the sun is almost close to the horizon and sunlight has to penetrate the thick layer of the earth's atmosphere to reach our eyes. As a result, the shorter wavelengths of the blue edge are scattered as the light rays pass through the floating dust , water particles, etc. of the atmosphere , but as the wavelength of light at the red edge is higher, it is less scattered , so that it travels directly to the earth. So we see the rising sun in the morning and the setting sun in the evening