Why does Beowulf hang Grendel's arm from the rafters of Herot?
As all of the previous posts noted, the act of hanging Grendel's arm over the rafter is a way for the poet to show Beowulf's prowess as a warrior. Never one to miss a chance to boast, Beowulf opted to create a showy visual of his feat.
But the poet also uses Beowulf's action with Grendel's arm to create something called "unity" in the plot. Writers create unity when they give their story a sense of completeness, a feeling that all of the events and key ideas in the story are thematically related and necessary to make the story complete. When Grendel's mother, furious over the killing of her son, bursts into Heorot looking for revenge, she does two things: She kills Hrothgar's best friend, and she takes her son's arm with her. She's a pretty smart monster and she knows how to hurt both Hrothgar and Beowulf. By having Grendel's mother remove Beowulf's symbol of victory, the poet has reminded us of Beowulf's earlier action and given the story a sense of completeness, of unity, that it wouldn't have otherwise. Most good stories, especially if they are not short stories, have multiple incidents that help build unity.
Hanging the arm by the rafters also doubles as a trophy, a concrete symbol of Beowulf's bravery and success in destroying Grendel. The gory nature of the trophy serves to further exemplify the complex, dangerous nature of this task. By hanging Grendel's arm in the hall, Grendel is still present in the kingdom, but now, it is now longer a threat, and its presence is a cause for celebration yet also a reminder of how heroes such as Beowulf are needed to restore order and peace.
In addition to Rene's answer, I would also argue that the showing off the Grendel's arm is a way for Beowulf to symbolically "shout from the rafters" his success where other warriors have failed. He quite literally lords his success over them. Remember, Grendel has been snacking on Danish knights for a dozen years and none of the men could stop him.
Beowulf could just have easily left the arm where it was, or chucked it into the sea after its dying owner. Instead, he uses the arm to cement his own reputation.
Grendel's severed claw, arm, and shoulder are symbols and proof of Beowulf's successful battle. He apologizes for not bringing the full corpse. It is, in part,to offer proof of success that it hangs from the rafters, but it is also a trophy of battle for Beowulf.