Lightning Shield is written “When a spell, melee or ranged attack hits the caster” however there are some strange behaviors lately that I personally have a theory on.
The Patchwerk interaction: on Patchwerk (and some other bosses in the past, but this is the most recent) every time the boss does a hateful strike to ANYONE, it triggers lightning shield on every shaman regardless of range. My theory is that the way hateful strike is coded, simply checking every character in raid for their position and health is enough to trigger LS.
The C’Thun interaction: Upon pulling C’thun, a similar phenomenon occurs, which is much more clear since it happens right at combat start before anyone else has a chance to enter the room
The most recent bug, Allied Spell Triggers: As of 20Feb25, there were reports of allied spell casts triggering lightning shield charges on the allies target. The example I will cite from the shaman discord is by user Tigly. He reported that priests casting spells on Mob X such as mind soothe and mind control would also trigger a Lightning Shield charge to proc on Mob X. This was also confirmed to work with rogue shuriken. It was apparently triggering on all three of their enhancement shamans.