Okay, I can kind of deal with him being the god of thunder and controlling lightning since thunder is a product of the former. The thing I have a real problem with is when he controls lightning indoors (happens often in comic books and I think in the MCU as well). The reason why is because lightning is an electrostatic discharge between a cloud and a cloud, or a cloud and the earth. So by definition, lightning cannot happen indoors. What Thor is really doing is just controlling electricity. Does anyone care to explain this away? I mean I have no problem with him having that ability, I have just never seen that stated it in any description of any version of Thor.
Maybe because "god of thunder, lightning, and electrical discharges reminiscent of lightning and emanating from sources other than clouds" doesn't have the same ring to it. Seriously. With all credit to @armadillo.
Given the source material for most mythological entities through history started primarily as word of mouth storytelling, you would suspect his appellation, Thor, God of Thunder to be all one need say to get the point across.
Legendary Thor, red haired, red beard, gauntlets and belt of strength
- The 11th century Christian missionary Adam of Bremen, on noting the great temple of the gods in Uppsala, Sweden, wrote, "Thor, they say, presides over the air, he governs the thunder and lightening, the winds and rains, fair weather and crops...If plague and famine threaten, a libation is poured to the idol Thor." -- Mythical Realm: Thor
Unlike fans and adherents of religion today with far greater knowledge of science and rational thinking, primitive man wouldn't have dared to question how Thor threw his lightning. They speculated about it but kept their opinions to themselves. Bolder storytellers said this:
- During a thunderstorm, Thor rode through the heavens on his chariot pulled by the goats Tanngrisni ("gap-tooth") and Tanngnost ("tooth grinder"). Lightning flashed whenever he threw his hammer Mjollnir. Mjollnir ("that smashes") was made for him by the dwarfs Brok and Eitri, who made many magical objects for the gods.
They dared to describe his legendary strength, fearsome enemies and final fate as:
- Thor wears the belt Megingjard which doubles his already considerable strength. His greatest enemy is Jormungand, the Midgard Serpent. At the day of Ragnarok, Thor will kill this serpent but will die from its poison. His sons will inherit his hammer after his death. Ragnarok ("Doom of the Gods"), also called Gotterdammerung, means the end of the cosmos in Norse mythology.
His legendary hammer was said to be able to kill a giant dead in a single blow, split a mountain range in half and return to his hand as quickly as a bolt of lighting. As legends go, this seems pretty complete and everything else is probably a local legend or tale which was later found and compiled by later generations. Legendary Thor was a bad-ass and was more popular than his father Odin.
As for Thor, the Marvelous re-creation of Jack Kirby and Stan Lee, his powers were not required to resemble the original mythological being and since they were creating a comic which needed visual pizzazz, they took liberties:
Thor would retain his ability to summon and command storms, wind, rain and lightning, with Mjolnir or without it. Those powers are within him. Mjolnir amplifies them.
Mjolnir would have all of the powers of myth and dozens more including the ability to absorb energy, move through time (rescinded) distort electromagnetic fields, generate electrical discharges and project powerful bursts of god-force energy capable of destroying almost anything.
He would have the strength of his father and his mother and be stronger than all of the other gods in Asgard, twice as strong with his magical belt and gloves
He would fly without the use of his previous chariot and goat steeds mentioned above. He would whirl his hammer above his head, and throw it, hanging on to its invulnerable strap.
Why can he do all of this? Because in a universe with Iron Man, Giant-Man, the Hulk, Ulik the Troll, the Wrecking Crew and the Absorbing Man, all who possess powers similar to the gods of legend, Thor would still need to be seen as god-like in their eyes.
Thus Kirby and Lee ensured, no matter who came into existence after Thor, his power levels ensured he would be acknowledged and respected as a powerful force for good in the Marvel Universe.
This meant sometimes shooting lighting from Mjolnir because he could and the All-Father gave him a weapon that could do that. Superpowers don't subscribe to historical or legendary limitations. While superheroes are mythical in nature, their creators are quite happy to take liberties with the legends as they see fit.
The long and the short of it is: Marvel writers wanted him to be able to control electricity along with lightning. It's that simple.
If he's the GOD of thunder (and lightning) he, obviously, can make them appear and happen anywhere he wants, he's not tied to physical or natural rules because he's a GOD.
You say that lightning is electricity discharging from a cloud to the ground. That's fair in our world. In a world with a god of thunder and lightning, lightning are an extension of it's pure will... sure, they usually happen from cloud to ground, but it's master just can summon them whenever he wants in the way he wants.
A good advice: stop trying to explain fantasy through science. It's a good idea to do it on science fiction, as science fiction try to keep in touch with reality and science, but this is not true with fantasy.