Ever seen a friend wrinkle their nose at a beer and declare it “skunked”? Or, tasted a beer that reminded you of that particularly pungent road kill? What is that?

Skunky beer is a well-known flavor defect, and everyone seems to have a theory as to what causes beer to go funky. But its alternate name, "light-struck" beer, hints at the true cause. As the name suggests, the phenomenon occurs when light-sensitive hops — a major beer ingredient that acts as a preservative and adds flavor — is exposed to too much light. Brewers have documented the problem since at least 1875. To combat it, beer is often stored in brown or green glass bottles to help filter out the light (aluminum cans and kegs block out light completely).

In 2001, chemists from the University of North Carolina at Chapel Hill figured out the details of the skunked beer. The scientists shot lasers at three isohumulones — the compounds responsible for hops’ light sensitivity — and used a device called a time-resolved electron paramagnetic spectroscope to measure the compounds that were created in the process. The focused laser light broke down the isohumulones, producing 3-methylbut-2-ene-1-thiol, or “skunky thiol,” which is chemically similar to the compound in a skunk’s glad that gives their spray such an intense smell .

In the real world, where beers aren’t bombarded by lasers, light-struck beer is due to visible light between 400-500 nanometers in wavelength (the blue end of the spectrum) and ultraviolet light, which has a wavelength of less than 400 nm. Brown bottles block out light under 500nm, and green bottles block light below 400nm, which is why the occasional Heineken will taste off. And, clear glass provides zero protection against light, which is why Corona advertisers cleverly suggest you drink their brew with a slice of lime.

Follow Life's Little Mysteries on Twitter @llmysteries, then join us on Facebook.