The structural, electronic, and optical properties of β-Ga2O3 with oxygen vacancies are studied by employing first-principles calculations based on density function theory. Based on the defects formation energies, we conclude the oxygen vacancies are most stable in their fully charge states. The electronic structures and optical properties of β-Ga2O3 are calculated by Generalized Gradient Approximation + U formalisms with the Hubbard U parameters set 7.0 eV and 8.5 eV for Ga and O ions, respectively. The calculated bandgap is 4.92 eV, which is consistent with the experimental value. The static real dielectric constants of the defective structures are increased compared with the intrinsic one, which is attributed to the level caused by the Ga-4s states in the bandgap. Extra peaks are introduced in the absorption spectra, which are related to Ga-4s and O-2p states. Experimentally, β-Ga2O3 films are deposited under different O2 volume percentage with ratio-frequency magnetron sputtering method. The measured results indicate that oxygen vacancies can induce extra emission peaks in the photoluminescence spectrum, the location of these peaks are close to the calculated results. Extra O2 can increase the formation energies of oxygen vacancies and thus reduce oxygen vacancies in β-Ga2O3.