MgxZn1-xO thin films have been prepared on silicon substrates by radio frequency magnetron sputtering at 60℃.The thin films have hexagonal wurtzite single-phase structure and a preferred orientation with the c-axis perpendicular to the substrates. The refractive indices of MgxZn1-xO films are studied at room temperature by spectroscopic ellipsometry over the wavelength range of 400-760 nm at the incident angle of 70°. Both absorption coefficients and optical band gaps of MgxZn1-xO films are determined by the transmittance spectra. While Mg content is increasing,the absorption edges of MgxZn1-xO films shift to higher energies and band gaps linearly increase from 3.24. eV at x=0 to 3.90eV at x=0.30. These results provide important information for the design and modelling of ZnO/MgxZn1-xO heterostructure optoelectronic devices.