The reason for lightning occurring is the movement of electrons between + (positive) and - (negative) charges that build up: within different parts of cloud; between different clouds; between cloud and ground.
The groovy thunder, which really gets the Boerbulls running, is created by the rapidly expanding air after the electrical movement. Speed of light is faster than sound which is why we often see the lightning before we hear the thunder.
Pretty cool!