it is warm in the thermosphere as more reactions take place here. where we get up high in the atmosphere, we start to encounter more intense radiation coming from the sun. we have x-rays and extreme short-wave ultraviolet radiation (which would be damaging to cells if it make it to the ground).
both oxygen and nitrogen absorb this radiation and it causes them to break apart their atomic components oxygen and nitrogen. then, this radiation interacts with oxygen and nitrogen and its atomic state and kicks out electrons from these atoms, leaving ions (ionisation of gases).