Loss-of-function mutations in the enzyme 7-dehydrocholesterol reductase are responsible for the Smith–Lemli–Opitz syndrome, in which 7-dehydrocholesterol (7-DHC) levels are markedly increased in the plasma and tissues of patients. This increase in 7-DHC is probably associated with the painful and itchy photosensitivity reported by the majority of patients with Smith–Lemli–Opitz syndrome. To identify the molecular targets involved in the activation and photosensitization of primary afferents by 7-DHC, we focused on TRPA1 and TRPV1, two ion channels expressed in nociceptive nerve endings and previously shown to respond to ultraviolet and visible light under pathophysiological circumstances. Recombinant human TRPA1 is activated and photosensitized in the presence of 7-DHC. Prolonged preexposure to 7-DHC causes more pronounced photosensitization, and while TRPV1 contributes less to the acute effect, it too becomes highly photosensitive upon preincubation with 7-DHC for 1 to 15 hours. Dorsal root ganglion neurons in primary culture display acute sensitivity to 7-DHC in the dark and also light-evoked responses in the presence of 7-DHC, which are exclusively dependent on TRPA1 and TRPV1. Similarly, prolonged exposure of mouse dorsal root ganglion neurons to 7-DHC renders these cells photosensitive in a largely TRPA1- and TRPV1-dependent manner. Single-fiber recordings in mouse skin–nerve preparations demonstrate violet light-evoked activation and a sensitization to 7-DHC exposure. Vice versa, 7-DHC pretreatment of the isolated trachea leads to a TRPA1- and TRPV1-dependent increase of the light-induced calcitonin gene–related peptide release. Taken together, our results implicate TRPA1 and TRPV1 channels as potential pharmacological targets to address the 7-DHC–induced hypersensitivity to light in patients.