The evolutionarily conserved TRPA1 channel can sense various stimuli including temperatures and chemical irritants. Recent results have suggested that specific isoforms of Drosophila TRPA1 (dTRPA1) are UV-sensitive and that their UV sensitivity is due to H2O2 sensitivity. However, whether such UV sensitivity served any physiological purposes in animal behavior was unclear. Here, we demonstrate that H2O2-sensitive dTRPA1 isoforms promote avoidance of UV when adult Drosophila females are selecting sites for egg-laying. First, we show that blind/visionless females are still capable of sensing and avoiding UV during egg-laying when intensity of UV is high yet within the range of natural sunlight. Second, we show that such vision-independent UV avoidance is mediated by a group of bitter-sensing neurons on the proboscis that express H2O2-sensitive dTRPA1 isoforms. We show that these bitter-sensing neurons exhibit dTRPA1-dependent UV sensitivity. Importantly, inhibiting activities of these bitter-sensing neurons, reducing their dTRPA1 expression, or reducing their H2O2-sensitivity all significantly reduced blind females' UV avoidance, whereas selectively restoring a H2O2-sensitive isoform of dTRPA1 in these neurons restored UV avoidance. Lastly, we show that specifically expressing the red-shifted channelrhodopsin CsChrimson in these bitter-sensing neurons promotes egg-laying avoidance of red light, an otherwise neutral cue for egg-laying females. Together, these results demonstrate a physiological role of the UV-sensitive dTRPA1 isoforms, reveal that adult Drosophila possess at least two sensory systems for detecting UV, and uncover an unexpected role of bitter-sensing taste neurons in UV sensing.