When a thunderstorm is brewing, thunder is the big performer when the sound of the bursting clouds in the sky, while lightning is the form of electricity that can be seen in the air—thunder booms as a sound in the clouds, which also produces electricity at the same time.
The most significant distinction within the two is that thunder is a sound, while lightning is something you can see. Electricity is generated inside the black clouds in the sky, due to water drops and ice crystals which crash into each other. Earth is also positively charged., and when the difference between charges becomes too evident, electricity forms as a result.
Lightning also produces a lot of heat. The air surrounding the electricity becomes heated up to the maximum. The heated air magnifies in a vicious manner. This activity results in the roaring sound that is called thunder.