Luther had been excommunicated in January. The Emperor summoned him to the imperial diet at Worms under a written safe conduct — a guarantee that had been offered to a heretic a century earlier and then dishonoured, which everyone in the room knew.
Two questions
On 17 April he was shown a table of his own books and asked two things: were they his, and did he stand by them. He acknowledged the first immediately. On the second he asked for time to consider — which surprised the room, and has been read ever since either as genuine hesitation or as a man buying a night to compose the answer properly.
He returned the next day and gave it. He distinguished between his devotional works, his attacks on the papacy and his polemics against individuals, conceded that the tone of the last was sometimes indefensible, and then declined to retract any of the substance unless he were shown to be wrong from scripture or plain reason.
The safe conduct held
The Emperor kept his word, which was not a foregone conclusion. Luther was allowed to leave. The Edict of Worms, issued a month later, declared him an outlaw whom anyone might kill without consequence and banned his writings across the Empire.
On the way home he was intercepted by armed men and taken to the Wartburg castle. This was a staged abduction arranged by his own prince, Frederick the Wise, to get him out of reach. He spent the better part of a year there translating the New Testament into German, which arguably mattered more than anything said at Worms.
Why the meeting mattered
The diet's purpose was to close the matter. It had exactly the opposite effect: it took a dispute between a friar and his church and made it a public constitutional confrontation, in front of the assembled princes of the Empire, in a form that could be printed and circulated within weeks.
Summoning someone to a hearing in order to end an argument gives them the largest platform they have ever had. It is a mistake that keeps being made.
What people get wrong
"Here I stand, I can do no other" almost certainly was not said. The words do not appear in the earliest accounts of the hearing; they were added to a printed version shortly afterwards. The reliably attested ending is the appeal to scripture and reason, followed by "God help me. Amen." — which is less quotable and more revealing.
He was called there to end an argument. It gave him the biggest audience of his life.

