So what do you think Luke's plan was when he tosses the lightsaber away? He's not going to fight his father, Vader has not yet been redeemed and Palpatine obviously has control of the situation. If he doesn't see the lightning attack coming, where did he think the confrontation was going to go? I'm not sure that he knew about the lightning or how to stop it, but he had to think Palps was going to attack with something more than words.
He was planning on being killed along with Palpatine when the rebels blew up the Death Star.
One of the biggest gripes I have with AotC and RotS is Sith Lightning. How awesome would it be if this was a little trick that Palpy kept to himself until he was utterly backed against the wall? It cheapens it in RotJ, IMO.