The red or orange tint the sun sometimes takes is caused by small particles in the Earth's atmosphere. The sun appears redder at sunset because the light must pass through a greater thickness of air compared to when the sun is at its zenith.
Packets of light that pass through the Earth's atmosphere are known as photons. These photons scatter off particles in the atmosphere. Blue-tinted photons have a shorter wavelength and tend to get scattered in the atmosphere. Red-tinted photons have longer wavelengths and tend to pass through the atmosphere rather than get scattered like the blue ones. This causes the red wavelengths to penetrate the atmosphere better than the blue ones, making them much more visible. When the sun has almost set, it is really already about a diameter below the horizon. The light at this position of the sun is bent by refraction before reaching an observer's eyes. The point in time when the sun is rising or setting is when the light has to travel through the most atmosphere. When thin clouds appear in front of the sun, the reddening effect is intensified, causing the clouds themselves to resemble a pinkish color. The clouds are thin as air and scatter the blue light so well that the red light is left, causing the pink color.