Many insects show strong behavioral responses to short wavelength light. Drosophila melanogaster exhibit Cryptochrome- and Hyperkinetic-dependent blue and ultraviolet (UV) light avoidance responses that vary by time-of-day, suggesting that these key sensory behaviors are circadian regulated. Here we show mutant flies lacking core clock genes exhibit defects in both time-of-day responses and valence of UV light avoidance/attraction behavior. Non-genetic environmental disruption of the circadian clock by constant UV light exposure leads to complete loss of rhythmic UV light avoidance/attraction behavior. Flies with ablated or electrically silenced circadian lateral ventral neurons have attenuated avoidance response to UV light. We conclude that circadian clock proteins and the circadian lateral ventral neurons regulate both the timing and the valence of UV light avoidance/attraction. These results provide mechanistic support for Pittendrigh's "escape from light" hypothesis regarding the co-evolution of phototransduction and circadian systems.