The influences of doping and stress on the electronic structure and optical properties of ZrO2 thin films were systematically studied by using the first-principles plane-wave ultra-soft pseudopotential method based on density functional theory. In this paper, the effect of Hf atom substitution doping on the physical properties of ZrO2 films is studied. The results show that Hf atom doping can reduce the band gap and density of states of ZrO2 films, which can reduce the surface defect charge and leakage current to some extent. The values of dielectric peak and absorption peak are significantly decreased after doping Hf atoms, and the waveforms of dielectric peak and absorption peak are narrowed, and the full wave at half maximum (FWHM) is significantly reduced. This paper also focuses on the physical properties and regularity of tetragonal ZrO2 films under different stresses. It is found that the compressive stress significantly regulates the band gap of the ZrO2 film and the band structures near the top of valence band and the bottom of the conduction band. After the stress is applied, the absorption range and absorption intensity of the absorption peak are significantly increased. The blue shift of the photon energy corresponding to the peak indicates that the absorption of ultraviolet light is enhanced with the increase of stress. In the low-energy infrared and visible light regions, the refractive index of ZrO2 film becomes larger after applying compressive stress, but in the ultraviolet region, the compressive stress causes the refractive index of ZrO2 film to increase first and then decrease. The above research results provide a theoretical basis for the design and application of ZrO2 thin film materials.