There are many threats to freshness. Culprits such as not storing the beer correctly, namely at the right temperature, is a big one. But beer’s biggest enemy when it comes to freshness is light strike.
Light strike is what causes a beer to become “skunked.” The complex chemical reaction involves blue spectrum and some ultraviolet light in sunshine messing with certain compounds produced by hops, called isohumulones, or iso-alpha acids. The light causes the isohumulone molecule to separate and create the sulfhydrl radical known as sulfur, which is what causes the beer to smell extremely unpleasant.
If you store your beer in glass bottles, the beer becoming skunked is just an inevitability, especially if you store your beer in glass that’s clear or green — hello, Corona and Heineken! — while brown glass protects against this phenomenon a bit. But your best bet is beer in a can. Cans not only block out harmful rays, they are also easier to transport and more sustainable than bottles, so it’s a win-win all around.