Lightning produces a very high temperature which makes nitrogen and oxygen present in air combine to form an oxide.