Participates in the repair of UV-damaged DNA by excising pyrimidine dimers that are the major UV-lesions (PubMed:6254991). DNA glycosylase activity hydrolyzes the glycosylic bond of the 5' pyrimidine of the dimer (PubMed:6254991). This leaves apurinic/apyrimidic (AP) sites in the DNA. These AP sites are removed by the AP lyase activity which cleaves the intrapyrimidine phosphodiester bond (PubMed:6254991). Catalysis proceeds via a protonated imine covalent intermediate between the alpha-amino group of the N-terminal threonine residue and the C1' of the deoxyribose sugar of the 5' pyrimidine at the dimer site (PubMed:8347626) (PubMed:16916523). Cleaves the N-glycosidic bond between the 5'-pyrimidine residue in cyclobutadipyrimidine (in DNA) and the corresponding deoxy-D-ribose residue. 2'-deoxyribonucleotide-(2'-deoxyribose 5'-phosphate)-2'-deoxyribonucleotide-DNA = a 3'-end 2'-deoxyribonucleotide-(2,3-dehydro-2,3-deoxyribose 5'-phosphate)-DNA + a 5'-end 5'-monophospho-2'-deoxyribonucleoside-DNA + H(+) Monomer. Phage T4 deficient in the enzymes are extremely sensitive to UV.