Thin films have various potential applications in electronic devices, and their performance is intricately linked with the electric and magnetic properties of the film, in which an important role is played by the presence of light elements, in particular Hydrogen, Oxygen and Nitrogen. The source of light elements, the form in which they are incorporated into the thin film, and how this is influencing the MgB2 thin film properties is currently under scrutiny by various research groups. Typically these films are grown on oxide ceramic substrates, such as Ah03-C and it is possible that the source of Oxygen is the substrate itself or the growth atmosphere. Here we report on a study of light elements in MgB2 thin films grown on various substrates, using heavy ions recoil and a time-of-flight detector. A series of MgB2 thin film samples produced by PLD (pulsed laser deposition) were analyzed, including films produced in-situ on Ah03-C substrates with an on-axis and off-axis geometry, one film produced in-situ with an ofT-axis geometry, and one film produced ex-situ, with a bulk-like Te. We also ana lyzed one film produced with on-axis geometry under the same conditions on Si (001) substrate. The amount of Oxygen detected by ToF, appears to be correlated with the Te of the films. the higher the Te the lower the oxygen content. Also, the superconducting properties of the examined thin films are discussed in the context of the results.