If I understand correctly, lightning is the discharge of electricity from the atmosphere into the planet. However, if I switch on a lamp, the wires are not causing thunder (or any audible sound).
I've also heard that the thunder comes from lightning breaking the sound barrier. This sounds weird to me since I would assume that lightning would be traveling at, well, light speed, so I'm not sure how the threshold could be crossed.
How does lightning cause thunder?