What causes the sunlight flavour in milk?

Most of us have tasted milk that has been left in the sun – it has a distinctive off-flavour. The reason is that milk and other dairy products turn rancid when exposed to light.