Lightning can heat air to about 28,000°C.
A strike heats the surrounding air so quickly that it expands and makes thunder.
When lightning passes through the atmosphere, it can heat the air along its path to about 50,000°F, or roughly 28,000°C.
The sudden heating makes the air expand rapidly and sends out a pressure wave. We hear that wave as thunder.