Hi! Lucasfilm Storygroup Lore Supervisor here. Luke knew a trick that Emperor Palpatine didn't!
Actually no, the Emperor was only disfigured by the lightning because it was bounced OFF Mace Windu's Lightsaber (regular lightning just hurts you).
...This is because of the "Zoonto Effect", brought about when Dark Side Class powers are used on a Kyber Crystal that has not been properly 'Bled', making it highly volatile when combined with the Dark Side (Oppo Rancisis: Shards of Darkness Issue #12: Downfall of Zoonto[2003]).
Emperor Palpatine never understood this fact as he skipped Sith Lightsaber Training so he could eat 15 cookies (Star Wars Teaches Counting! [1995]).
