Direct sunlight is bad for the temperature fluctuations it can bring, as well as the harmful UV rays. I don't know which is worse, but neither is good.

Hence why most beer bottles are dark green or brown.