When light from the Sun or the Moon strikes Earth’s atmosphere it is scattered, sent in all directions by the atoms and molecules that make up the air. During this scattering process some of the light is polarised – instead of the electric and magnetic fields oscillating in many planes simultaneously, they oscillate in only one plane.
The polarisation of the light from the Sun or Moon is at right angles to the direction that the light is coming from; when the Sun or the Moon is very low in the sky (at sunset/sunrise or moonset/moonrise) the direction of polarisation is parallel to the horizon. The degree of polarisation depends on the angle between the light and the atmosphere, with the greatest degree of polarisation occuring when looking at 90° to the source.
Source: Christopher Kyba
The image on the left shows the degree of polarisation observed in a rural location. The image on the right shows the same section of the night sky, but observed from an urban location (the circular patterns in both images are caused by the movement of stars across the sky.) Because light pollution from streetlamps is not polarised, the effect of the streetlamps is to destroy the polarisation “data” that some animals use to navigate.
Source: C. C. M. Kyba, T. Ruhtz, J. Fischer and F. Hölker “Lunar skylight polarization signal polluted by urban lighting”, Journal of Geophysical Research 116 (2011). doi: 10.1029/2011JD016698.