What causes Grendel to attack the mead-hall in Beowulf?
Grendel is the spawn of Cain, purely wretched by nature. His entire being is devoid of joy. Some think that when he hears the jubilant parties that take place at Herot he is filled with intense jealousy because he has never experienced anything happy. This jealousy may also be interpreted as hatred, which seems to present Grendel as pure evil, a rather one-sided view of the story. Some scholars prefer to present Grendel as a creature filled with bloodlust, but presenting him as a sad being without love experiencing envy seems to present a more complex story with more realistic emotions.
Yes, as an agent of evil Grendel does attack Herot because he hates/envies the happiness and prayers of the warriors who reside there. One additional comment to make is that Hrothgar and his people are shocked not by just Grendel's carnage and bloodlust but also because there is no way to make amends with him. There is nothing they can do to stop him. His motive are not clear. There is no price they can pay to stop the murders (note how Hrothgar once helped buy peace between Beowulf's father and rival people). This makes the attacks that much more difficult for Hrothgar and his people.
Grendel attacks because he is evil (spawn of Cain) and hates the happiness and noise of the men at the hall. He attacks killing 30 men, and then goes back the next night for more. The only way men can stay alive is to leave the hall.
he attacks because the men were having fun and being loud in the hall, he got annoyed and when he went to check on them they were sleeping so he attacked