X-ray diffraction, atomic force microscopy, field emission scanning electron microscopy, UV-visible photometry, and photoluminescence measurements were used to investigate the surface morphology and structural and optical properties of MgO films. Magnesium oxide films deposited by the spray pyrolysis technique were studied. The substrate temperature was varied from Ts = 643 K to 693 K. Magnesium chloride hexahydrate (MgCl2 ·6H2O), dissolved in deionized water, was used as the precursor solution. It was established that the single phase films crystallize into a cubic structure with very fine crystallite size (about 2 nm). The optical band gaps of the samples were varied from 3.64 eV to 3.70 eV. Also, the films have a high level of transmittance of 90%. Photoluminescence spectra show the emission peaks at approximately 412 nm (3.00 eV) and 524 nm (2.38 eV). The peak with the energy of 3.00 eV is ascribed to holes trapped in magnesium ion vacancies acting as acceptors (F + center). The broad emission peak at 524 nm is related to the presence of defects (F − centers) associated with oxygen ion vacancies.