Hf(1-x)YxO2 (x = 0, 0.10, 0.15, 0.20) epitaxial thin films on YSZ(100) substrate were prepared at different oxygen (O2) partial pressures (100, 70, 30, and 10 sccm) by pulsed laser deposition. The effect of oxygen partial pressure on crystalline and local structure was investigated using X-ray diffraction (XRD), Fourier Transform Infrared (FTIR) and X-ray absorption spectroscopy (XAS). The surface composition was determined by X-ray photoelectron spectroscopy. The XRD and FTIR studies reveal that undoped HfO2 thin films remain in monoclinic phase, and the Hf0.85Y0.15O2 & Hf0.80Y0.20O2 films stabilize in cubic phase at all oxygen pressures, whereas the structure of Hf0.90Y0.10O2 films changes from orthorhombic to cubic as oxygen pressure reduces from 100 sccm. The XAS at Hf-L3 edge and O K-edge shows the changes in bond distances, disorder and hybridization. In monoclinic HfO2 films the Hf–O bond distance and disorder increases and Hf–Hf bond decreases as the O2 partial pressure decreases, whereas disorder in doped films shows anomalous behaviour. The oxygen vacancies are evident from both XAS and photoluminescence studies. The results enlighten a deeper understanding of phase change, local structure, optical properties and pave a way to stabilize and identify different technologically important HfO2 phases for dielectric and ferroelectric applications.