The influence of the microstructure of strontium-titanate-oxide (SrTiO3 or STO) thin films on their optical properties was investigated through an extensive characterization. The STO films have been deposited on silicon substrates by reactive pulsed laser deposition. The effect of the oxygen deposition pressure on the crystalline quality of the films was systematically studied by x-ray diffraction and scanning electron microscopy. Rutherford backscattering spectrometry, x-ray photoelectron spectroscopy, and secondary ion mass spectrometry were used to determine the atomic density and depth concentration profiles of the various species forming the film. The refractive index and extinction coefficient were obtained using variable angle spectroscopic ellipsometry. Based on this full characterization, it is demonstrated that the optical characteristics of the films are directly correlated to their microstructural properties. In particular, the refractive index increases with film density, while losses decrease. In addition, the interface between STO and Si is characterized by an interdiffusion layer. As the deposition pressure is enhanced, the width of this layer significantly increases, inducing localized inhomogeneity of the refractive index.