In this study, CdS: MgO films were synthesized using the chemical spray pyrolysis method, varying the film thickness. X-ray diffraction (XRD) analysis confirmed the polycrystalline nature of the films, with an observed increase in average crystallite size corresponding to thicker films, and The films' surface morphology indicates an absence of crystal defects such as holes and voids . The investigation of energy gap and optical parameters revealed a dependency on film thickness, with the energy gap shifting from 2.412 eV for a thickness of 150 nm to 2.354 eV for a thickness of 750 nm. Hall effect measurements demonstrated an augmentation in carrier concentration with increasing film thickness. The findings suggest a substantial influence of thickness on the physical properties of CdS: MgO thin films. Notably, thicker films exhibit characteristics that make them promising candidates for application as absorber layers in solar cells. This research provides valuable insights into tailoring the properties of these films for optimal performance in solar energy conversion devices, emphasizing the importance of controlling thickness in achieving desired electronic and optical characteristics.