I understand that Luke turned himself in on Endor to turn Vader to the good side, but after Vader refuses and takes him to the Emperor, he just does nothing except for look out that window. Did he just give up? Why didn't he do anything until he was tricked by the Emperor into doing something?
The Emperor wanted Luke to either kill Vader or be destroyed. He would have preferred to have Luke kill Vader, because in doing so, Luke would fall to the Dark Side of the Force. This being the case, it is reasonable to assume that by doing nothing, Luke was proving himself to be above the Emperor's efforts to manipulate him. All Luke had to do was resist the temptation to lash out in aggressive violence, and he would prove his loyalty to the Light Side of the Force. This was his final test. If he passed the test, he would become a Jedi Knight.
Master Yoda says as much in an earlier scene:
LUKE But I need your help. I've come back to complete the training.
YODA No more training do you require. Already know you that which you need.
Yoda sighs, and lies back on his bed.
LUKE Then I am a Jedi?
YODA (shakes his head) Ohhh. Not yet. One thing remains: Vader. You must confront Vader. Then, only then, a Jedi will you be. And confront him you will.
YODA Remember, a Jedi's strength flows from the Force. But beware. Anger, fear, aggression. The dark side are they. Once you start down the dark path, forever will it dominate your destiny.
He beckons the young Jedi closer to him.
YODA Luke...Luke...Do not...Do not underestimate the powers of the Emperor, or suffer your father's fate, you will. Luke, when gone am I (cough), the last of the Jedi will you be. Luke, the Force runs strong in your family. Pass on what you have learned, Luke...
So Luke has to confront Vader and the Emperor in order to become a Jedi. This isn't a random task, it is an extremely difficult trial by fire. The danger is very real. He has to confront them and avoid giving in to the Dark Side, and the Dark Side is fear, aggression, hatred, and anger. He has to keep his cool, no matter what the Emperor throws at him.
Just before Luke surrenders, he tells Leia "There is still good in [Vader]. I felt it." And when he turns himself in, the following exchange takes place:
VADER You don't know the power of the dark side. I must obey my master.
LUKE I will not turn...and you'll be forced to kill me.
VADER If that is your destiny.
LUKE Search your feelings, father. You can't do this. I feel the conflict within you. Let go of your hate!
VADER It is too late for me, son. The Emperor will show you the true nature of the Force. He is your master now.
LUKE Then my father is truly dead.
We don't know for sure, but it is probable that Luke knows his father is lying, despite his claim to the contrary.
Luke is brought before the Emperor, and in the event, he does lose his temper once or twice, but only for a moment. When he appears to have totally lost control of himself and engages Vader in a vicious battle, he regains his composure after lopping off Vader's hand. He realizes that killing Vader would be tantamount to becoming Vader, and tosses his light saber aside.
Luke proudly declares his loyalty to the Light Side of the Force, and throws the Emperor's derision back in his face. The Emperor is enraged, and unleashes a barrage of Force-Lightning. This is the moment in which Luke's plan is revealed: he is utterly defenseless against the Emperor's attack, or at least appears to be, and he begs his father to help him. He has just shown unexpected mercy on his father, and that act is what sets the wheels in motion.
Vader is torn between his fealty to the Emperor and his newfound love for his son - his son who just moments earlier chose to let him live, when he was incapable of defending himself and it would have been incredibly easy to kill him. The sight of his own, unexpectedly merciful son writhing in agony, mere moments away from death, is too much for Vader to bear. He makes the ultimate sacrifice. He lifts his master above his head, carries him to the edge of the abyss, and hurls him in. In the process, he is mortally wounded by the now-undirected Force-Lightning.
This is exactly what Luke had to do in order to become a Jedi. He could only become a Jedi by (1) resisting the temptation to resort to aggressive violence, and (2) setting the stage for his father to redeem himself. He managed to achieve both of these tasks. If he had acted differently, he would have fallen to the Dark Side and been irredeemably lost - which is precisely what the Emperor wanted to happen.
The short version of the answer is this: Luke did nothing when the Emperor taunted him because that it exactly what he had to do.
Some alternate literature on this event actually implies he intended to lure the Emperor into a false sense of security and then assassinate him... in a way. Remember that he knew fully about the plans for destroy the Death Star that he himself had just gotten onto with Vader. His plan was very simple: Distract Vader and Palpatine until the Death Star was destroyed, he might have died, but he would have ended the Sith at the same time, and he believed his sister could still possibly bring about a return of the Jedi.
Hence why in the movie he remarks that he's not the last and when meeting the Emperor he offhandedly states that they'd all soon die.