After Beowulf slays him, Grendel's mother attacks the hall and is then also defeated. The cave represents their heritage. As descendants of Cain, they are affiliated with black magic, sorcery, demons, ancient runes, and hell itself. When Grendel's mother is able to fight Beowulf in the cave, she has a significant advantage; his victory is all the more brilliant. It is not said whether he wins because of his own skill, the influence of magic, or God's intervention. All are mentioned, probably because the poet borrowed from various influences in making the poem.
Also, the cave itself defines a world alien to Heorot. One is high and bright and full of song and joy, and the other is dark and dank and full of evil, beneath a mere in the middle of a fen and the symbolic home of resentful outcasts. The cave where Grendel and his mother hide from the world is symbolic of their lives as outcasts. Hidden beneath a treacherous mere in the middle of a dark, forbidding swamp, the cave allows them a degree of safety and privacy in a world that they view as hostile. They certainly are not welcome at Heorot, and they know it.
In summation, Grendel's cave is symbolic in way of describing what an outcast truly is and what it represents. Beowulf is good at demonstrating this as well because we can all tell what grendel is and what his cave