So as not to confuse anyone I will describe another theory that scientists believe is the reason for thunder. This one is usually stated in children’s book and the such so I’m unsure of which one to trust. Either way, the making of thunder is amazing.
As the lightning streaks across the sky the air around heats up and expands rapidly created sound waves that reach the hearer and make the sound of thunder.
Personally, I like the first theory much better but us scientists aren’t called to state what we like as fact (even though some seem that way).