Light and excessive heat can damage the flavor and stability of your finished beer. They cause a variety of off-flavors and will also prematurely age your beer.
Light
We’ll begin with light since it is the simplest to address. Direct sunlight creates a specific off-flavor known appropriately as “skunky beer.” The skunky flavor and smell come from a compound known as 3-methylbut-2-ene-1-thiol, or MBT for short. This MBT “skunky” odor has a very low flavor detection threshold—as low as a few parts per trillion.
All modern beers contain hops with alpha acids that become isomerized during the boil and provide bitterness to the beer. If you expose these alpha acids to UV-B light from the sun, they will combine with sulfur in the beer from the malt and give a lovely MBT compound and aroma. In direct summer sunlight, the reaction can happen in just a few minutes!