Envy and revenge are both central themes to Beowulf, and they're both addressed in numerous ways.
Envy: The clearest example of envy can be seen in Grendel's response to Heorot's happy, rowdy, and light-filled celebrations. As a descendent of Cain, Grendel is an outcast of organized society, and he's condemned to wander in a lonesome fashion. As such, the fact that others enjoy community and friendship makes Grendel not only angry, but envious. Thus, we can see Grendel's attacks against Heorot as a display of his envy.
Revenge: Revenge is central to the warrior culture described in Beowulf. In particular, revenge was usually taken through what was called a "blood-feud," which involved warriors fighting against those who had killed their kinsman, lord, or king. We can see revenge at work in many ways in the poem. For example, Grendel's mother avenges her son's death by attacking Heorot, while the dragon embarks on a rampage to avenge the theft from his hoard of treasure (and then Beowulf accordingly fights the dragon to take revenge for the destruction). As such, we can see that revenge was an important element in the society described in the poem, and that individuals were honor-bound to retaliate against those who wronged them.
The Old English poem "Beowulf" opens with Grendel's attack on King Hrothgar's mead hall. There are several reasons behind the attack. The first is simply that Grendel is an evil monster. The second is that Grendel is hungry. The third is that Grendel hates the noise of the soldiers, and also envies their happy life.
The second instance of envy we encounter is somewhat more positive in the challenge that Unferth poses to Beowulf. What we see in the type of envy that exists among the heroic figures in the poem is an element of what theorists such as John Miles Foley and Walter Ong describe as the "agonistic" element of traditional epos, in which heroic characters strive with each other for fame; this envy, while it can turn bitter, and lead to internecine squabbling, it can also been seen as a spur to great achievements.
Revenge is an especially important part of the Grendel story arc. After Beowulf injures Grendel, Grendel's mother decided to take revenge on the Danes for killing her son. Beowulf than kills Grendel's mother in revenge.