Thunder is the sound caused by lightning. Depending on the distance and nature of the lightning, it can range from a sharp, loud crack to a long, low rumble (brontide). The sudden increase in pressure and temperature from lightning produces rapid expansion of the air surrounding and within a bolt of lightning.
When you prick a balloon, a tiny hole is made on the surface of it. But, if it is slowly inflated it will not produce pop sound as the air will leak slowly until it was completely deflated and return to its original size. However, if the balloon is inflated to its maximum size due to which the molecules of the polymer are in a lot of tension. In such a way that every point on the surface is uniformly pulls in all directions which keep the balloon tightly stretched. The moment when a tiny hole appears on the surface, rubbers of the balloon now will no longer being pulled uniformly in all the directions. This causes the net force to pull the skin away from the hole, which further increases the hole’s size and balloon explodes with popping sound.
Don’t forget it that the pop sound is created after a sudden pressure change due to the rapid expansion of the air inside the balloon. All this process happens in a fraction of seconds.