We have the ancient Egyptians to thank for inventing beer thousands of years ago, but it was only bottled and sold commercially in the 19th century.
Beer was first stored in clear glass bottles, which worked for a while. But people soon realized that leaving those bottles in the sun would leave the beer smelling ‘skunky’ due to UV rays altering the flavour of the liquid.
The darker colour of green and brown bottles blocks out damaging UV rays providing the beer with more protection and a skunk-free smell. Fun fact: there are more green bottles than brown because there was a shortage of brown glass after WWII.