During a storm, colliding particles of rain, ice, or snow inside storm clouds increase the imbalance between storm clouds and the ground, and often negatively charge the lower reaches of storm clouds. Objects on the ground, like steeples, trees, and the Earth itself, become positively charged—creating an imbalance that nature seeks to remedy by passing current between the two charges.
Lightning is extremely hot—a flash can heat the air around it to temperatures five times hotter than the sun’s surface. This heat causes surrounding air to rapidly expand and vibrate, which creates the pealing thunder we hear a short time after seeing a lightning flash
Source: natgeo