In the present work, a study of the structural defects in HfO2 thin films deposited by dip-coating on p-type silicon substrates treated under different conditions, such as air-annealing, ultraviolet irradiation, and simultaneous annealing-UV irradiation, is presented. HfO2 thin films were analyzed by grazing incidence X-ray diffraction, Raman spectroscopy, optical fluorescence, atomic force microscopy, and UV-Vis diffuse reflectance. Films treated at 200 ºC and 350 ºC present peaks corresponding to monoclinic HfO2. After UV treatment, films became amorphous. The combination of annealing at 350 ºC with UV treatment does not lead to crystalline peaks, suggesting that the UV treatment causes extensive structural damage. Fluorescence spectroscopy and UV-Vis spectroscopy suggested that films present oxygen vacancies as the main structural defects. A reduction of oxygen vacancies after a second thermal treatment was observed, but in counterpart, after UV irradiation, fluorescence spectroscopy indicates that more defects are created within the mobility gap, irrespectively of the simultaneous annealing at 350 ºC. An electronic band diagram was proposed assigning the observed fluorescence bands and optical transitions. The results suggest that the electronic structure of HfO2 films can be tailored with a careful choice of thermal annealing conditions along with the controlled creation of defects using UV irradiation, which would open the way to multiple applications of the materials either in microelectronics and photocatalytic/electrocatalytic applications such as photodegradation and hydrogen generation.