Light, especially UV light, triggers oxidation in olive oil. The oil loses aroma and polyphenols and can turn rancid over time. Clear glass lets a lot of light through, while dark glass or a tin keeps most of it out.
That is why it is worth buying olive oil in dark bottles and keeping it out of sunlight at home too. The best place is a cupboard, not the windowsill next to the hob.