Thin films of Zn 1- x Mg x O, with Mg compositions in the range, 0 <x <0.4, have been deposited onto soda-lime glass substrates using chemical spray pyrolysis. The effects of altering the alloy composition on the chemical and physical properties of the layers were investigated using X-ray photoelectron spectroscopy, atomic force microscopy, Raman, optical and electrical measurements. The data shows systematic shifts in the properties of the layers with Mg-content. In particular, the optical absorption data showed that the influence of Mg-content on the energy gap of Zn 1- x Mg x O films is significant. Layers with x = 0.24 had an optical energy band gap, E g = 3.87 eV. The best layers produced had properties appropriate for application as Cd-free buffer layers in copper indium gallium selenide (CIGS) solar cells.