What is the significance of Grendel's cave in Beowulf?

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 welcomed at Heorot, and they know it.
The cave also represents their heritage. As descendants of Cain, they are associated with sorcery, black magic, demons, ancient runes, and hell itself. When Grendel's mother is able to fight Beowulf in the cave, she has a distinct advantage; his victory is all the more significant. It is not clear whether he wins because of his own ability, the influence of magic (the giant sword), or God's intervention. All are mentioned, probably because the poet borrowed from various influences in creating the poem. The cave itself represents a world alien to Heorot. One is high and bright and full of song and joy, towering as the Scyldings' greatest achievement. 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.