Went looking through the history. u/Iphikrates offers an explanation in "Did ancient and medieval armies get >struck by lightning at significant rates?"
We get this question here fairly regularly, so I just want to start with this: we may be inclined to think that warriors getting hit by lightning was more likely back when metal armour was in common use, but this may just be the result of the warped view we have of warfare in the past. Greek hoplites only put on their armour immediately before battle, and most would have worn it for no more than a few hours of a single day of their campaign. Since soldiers have hardly stopped using metal equipment since then, and soldiers from WW2 probably carried more metal (in the form of guns, knives, buckles, buttons, canteens, ammo and helmets) on their body at all times than the average ancient warrior would ever dream of wearing (not to mention all the driving around in tanks and armoured vehicles), you'd be much more likely to find modern examples than ancient ones.
That said, there is at least one example from Greek history, though the story is doubtful. I'll get to this below - the story is first recorded in the Roman period so it'll pay to look at a few earlier sources first.
The fascinating fact is that thunder and lightning come up fairly regularly in Greek battle descriptions, because it happens to have played a major role in a few notable battles. This is not because people were getting zapped left and right, but simply because thunderstorms are loud and flashy and violent and disorienting - not ideal if you're already preoccupied with fighting for your life - and also because they were commonly interpreted as some sort of message from the gods. Thunder could be the sign of the displeasure, but also of the support of Zeus the Thunderer, especially if it seemed unprompted:
When Archidamos made this speech, it is said that from a clear sky there was lightning and thunder as a favourable omen for him; and it happened also that on the right wing there was a sanctuary and a statue of Herakles. As a result, therefore, of all these things, it is reported that the soldiers were inspired with so much strength and courage that their leaders struggled to restrain them as they pushed forward to the front.
-- Xenophon, Hellenika 7.1.31
No one is being hit by lightning here; peals of thunder are heard from a clear sky, and they are interpreted as the gods' assent in Archidamos' pre-battle speech, possibly related to the shrine to Herakles whom the kings of Sparta claimed as their ultimate ancestor. The Spartans were so galvanised by these signs that they went on to win the battle without losing a single man on their own side; the engagement has gone down in history as the Tearless Battle (368 BC).
But the effect was not always a sense of encouragement. For inexperienced troops, caught for the first time in the heat and stress of battle, the sudden noise of thunder could be a thing of terror, sometimes enough to make battle lines waver. According to Thucydides, the Athenian victory outside the walls of Syracuse in 415 BC was at least partially due to the enemy being afraid of the thunder, while the seasoned Athenian veterans were unfazed by the rough weather:
The armies now came to close quarters, and for a long while fought without either giving ground. Meanwhile there occurred some claps of thunder with lightning and heavy rain, which did not fail to add to the fears of the party fighting for the first time, and very little acquainted with war; while to their more experienced adversaries these phenomena appeared to be produced by the time of year, and much more alarm was felt at the continued resistance of the enemy.
-- Thucydides 6.70.1
In cases like these, thunder and lightning could help tip the scales of battle just by happening within earshot of the men. But there were also cases where bad weather took a more proactive role, changing the whole nature of the fight. This is where metal armour also comes in with a will. Consider the battle of the Krimesos (339 BC), in which a Sicilian Greek alliance fought a Carthaginian invasion force:
But when the struggle came to swords and the work required skill no less than strength, suddenly, from the hills, fearful peals of thunder crashed down, and vivid flashes of lightning darted forth with them. Then the darkness hovering over the hills and mountain summits came down to the field of battle, mingled with rain, wind, and hail. It enveloped the Greeks from behind and lashed their backs, but it lashed the barbarians in the face and blinded them, a tempest of rain and continuous flames dashing from the clouds.
In all this there was much that gave distress, and most of all to the inexperienced; and particularly, as it would seem, the peals of thunder worked harm, and the clatter of the armour pummeled by the dashing rain and hail, which made it impossible to hear the commands of the leaders. Besides, since the Carthaginians were not lightly equipped, but, as I have said, encased in armour, both the mud and the bosoms of their tunics filled with water impeded them, so that they were unwieldy and ineffective in their fighting, and easily upset by the Greeks, and when they had once fallen it was impossible for them to rise again from the mud with their weapons. For the Krimesos, having been already greatly swollen by the rains, was forced over its banks by those who were crossing it, and the adjacent plain, into which many glens and ravines opened from the hills, was filled with streams that hurried along no fixed channels, and in these the Carthaginians rolled about, struggling to break free.
Finally, the storm still assailing them, and the Greeks having overthrown their first rank of four hundred men, the main body was put to flight. Many were overtaken in the plain and cut to pieces, and many the river dashed upon and carried away to destruction as they encountered those who were still trying to cross, but most of them the light-armed Greeks ran upon and despatched as they were making for the hills.
-- Plutarch, Life of Timoleon 28.1-5
This horrific scene shows just how much of a difference a thunderstorm could make, and how getting struck by lightning would be the least of a heavy infantryman's worries. The unlucky Carthaginians had their hands full with the disorienting flashes, the deafening noise, the slashing rain, the sucking mud, and the frothing river. The inexperienced Carthaginian soldiers were unable to see, unable to hear commands, unable to use their drenched weapons or march through the flooded field; they panicked, and in their desperate flight they were trampled into the mud, speared like fish by pursuing Greeks, or carried away by the torrent. Ten thousand men fell, three thousand of them citizens of Carthage. But, if we believe Plutarch, not a single one of them was struck by lightning.
This sets up the context of our only known example where people were being directly hurt by lightning bolts. The scene is a battle at Delphi, where the Phokians faced an invasion of Gauls in 279 BC. Our only source, Pausanias the travel writer (Guide to Greece 10.23.1-4), tells us that the eve of battle was marked by especially rough weather. First, as noted above, this was seen by the Greeks as an omen in their favour:
Soon portents boding no good to the barbarians were sent by the god, the clearest recorded in history. For the whole ground occupied by the Gallic army was shaken violently most of the day, with continuous thunder and lightning.
Then, Pausanias notes what was also recorded by Thucydides and Plutarch, that the noise of the thunder scared the inexperienced and made it impossible to receive and obey commands:
The thunder both terrified the Gauls and prevented them hearing their orders...
But then it gets real:
...while the bolts from heaven set on fire not only those whom they struck but also their neighbors, themselves and their armour alike.
And then it gets less real again, because the Phokians who told Pausanias this story clearly weren't holding back:
Then there were seen by them ghosts of the heroes Hyperochos, Laodokos and Pyrrhos; according to some a fourth appeared, Phylakos ["guardian"], a local hero of Delphi.
Like, really not holding back:
All the day the barbarians were beset by calamities and terrors of this kind. But the night was to bring upon them experiences far more painful. For there came on a severe frost, and snow with it; and great rocks slipping from Mount Parnassos, and crags breaking away, made the barbarians their target, the crash of which brought destruction, not on one or two at a time, but on thirty or even more, as they chanced to be gathered in groups, keeping guard or taking rest.
This was how local legend explained the Phokian victory: the terrain, the gods, the heroes, and even the weather had intervened on their side, throwing everything they had at the invading Galatians. How seriously we can take this story is a question we cannot resolve, since this local tradition is the only source we have.
.......................................... All of which is u/Iphikrates response.