Lightning is a rare yet naturally occurring phenomenon in Minecraft. It is rare because the weather in Minecraft is usually sunny, and even when it's not, it only produces thunderstorms sometimes.
Lightning, when not directed by newly added lightning rods, can wreak havoc on the Minecraft world. Any flammable block (wood, wool, TNT, vines, hay bales, bamboo, scaffolding flowers, and more) can be lit on fire by a lightning strike, which can quickly spread. It can affect certain mobs as well.
Here's what it does to each of them.
What lightning does to Minecraft mobs
Lightning can have huge effects on certain mobs, though for many it does nothing. Lightning strikes can kill players and mobs that aren't changed by it.
Lightning may randomly spawn what is called a skeleton trap horse with 0.75–1.5% chance on Easy difficulty, 1.5–4% on Normal, and 2.8125–6.75% on Hard. Once a player gets within one of these affected horses, it can transform into four skeleton horses. After 15 minutes of not being triggered, it will despawn.
Pigs that are struck by lightning will turn into zombie pigmen. They will be passive unless attacked and can eventually despawn. A creeper that is struck by lightning will become a charged creeper, which can cause mob heads to drop if the explosion kills one.
A Minecraft villager that has the misfortune of being struck by lightning will not die, but it will turn into a witch. Mooshrooms will switch colors when struck, from red to brown and vice versa. A turtle, like most mobs, dies instantly but instead of the normal loot drops, it will leave a bowl behind.
The rare occurrence of lightning striking a mob or player will deal 5 damage or two and a half hearts.
On the other hand, lightning rods can help direct lightning away from a player, or towards a mob if that is desired. That can be a great method of creating charged creepers or skeleton horses.