The cave where Grendel and his mother hid is symbolic. It is a place where they lived as outcasts. The place is also hidden inside a dark mere. The cave also accords the mother and son some level of peace from a world that they view to be highly violent against them. Grendel and his mother are not allowed to step in Heorot, and they are fully aware of the fact. To that end, they have a view that their cave offers them some level of serenity that they call for.
The cave also represents the heritage of Gretel and his mother. They are descendants of Cain. They are, therefore, associated with black magic, sorcery, demons, hell and ancient runes. When Grendel's mother has the chance to fight Beowulf, she gains the advantage of having to engage in the fight from the comfort of her cave. She is fully aware of the advantage that lies in her way and is, therefore, willing to take full advantage of it. Fortunately, Beowulf manages to win over the monster, in spite of the great disadvantage that lies in his way.