There are many many ways by which you can burn things in the absence of oxygen
Burning is a process in which energy is released due to the chemical reactions taking place.
Actually in the Sun there are nuclear reactions taking place that release much much much much more amount of energy, than from conventional burning.
It is the energy traveling as light or radiation, because of which we percieve that the sun is burning, but actually it is releasing huge amount of energy due to the nuclear fusion of hydrogen atoms taking place.