Wine bottles are often dark because the colored glass helps protect the wine from the damaging effect of sunlight and other ultraviolet light sources.
UV light can have negative effects on the quality of wine, particularly in regards to its flavor and longevity. Exposure to UV light can cause compounds in wine to oxidize, which can cause deterioration of flavor and aroma.
Additionally, UV light can also trigger chemical reactions in wine that can lead to the formation of unwanted compounds, such as 2,4,6-trichloroanisole (TCA), which can cause musty tastes in wine.
Colored glass, such as green or brown, therefore acts as a natural filter, blocking UV rays and preventing these negative effects on the quality of the wine. However, it is important to note that this protective effect is limited, and that the wine must still be stored in a cool, dark and stable place to ensure maximum quality and longevity.