In the end each clan on the outlying coasts beyond the whale-road had to yield to him and began to pay tribute. That was one good king. (9-11)
The narrator of Beowulf is extremely clear about what a good king is like: he's strong enough to dominate all the surrounding tribes and demand tribute from them. It's our first clue that, even though Beowulf is all about good versus evil, the definition of "good" may not be what we expect.
So times were pleasant for the people there until finally one, a fiend out of hell, began to work his evil in the world. (99-101)
Grendel isn't just the enemy – he's a personification, or maybe that should be monster-fication, of everything that is evil. He's literally a "fiend out of hell," a descendant of Cain, inherently rotten.
"I had a fixed purpose when I put to sea. As I sat in the boat with my band of men, I meant to perform to the uttermost what your people wanted or perish in the attempt, in the fiend's clutches. And I shall fulfill that purpose, prove myself with a proud deed or meet my death here in the mead-hall." (632-638)
It's all or nothing in this fight to the death: the good warrior Beowulf against the evil demon Grendel. Things can't get much more clear cut than that.
Venturing closer, his talon was raised to attack Beowulf where he lay on the bed; he was bearing in with open claw when the alert hero's comeback and armlock forestalled him utterly. The captain of evil discovered himself in a handgrip harder than anything he had ever encountered in any man on the face of the earth. (744-752)
Even though Beowulf is the epitome of a good hero and Grendel is a monstrous demon, they're actually a well-matched pair – both are excellent wrestlers and unforgiving warriors. Maybe good and evil don't always look that different in this particular epic.
Inside Heorot there was nothing but friendship. The Shielding nation was not yet familiar with feud and betrayal. (1016-8)
Most of the time, the "evil" in Beowulf consists of inherently depraved fantastic creatures – demons like Grendel, sea monsters, and dragons. Occasionally, however, we get hints that another kind of evil could come from inter-tribal feuding. Perhaps human beings can create their own evil without needing monsters to represent it for them.
Like a man outlawed for wickedness, he must await the mighty judgement of God in majesty. (976-8)
Grendel may be a demon from hell, but he's insignificant compared to the mighty power and goodness of God. Beowulf may be a battle between good and evil, but the two sides are nowhere near equal. This isn't a dualistic fight between God and the Devil; it's God triumphing over all the little, petty demons on earth.
The monster wrenched and wrestled with him but Beowulf was mindful of his mighty strength, the wondrous gifts God had showered on him: He relied for help on the Lord of All, on His care and favour. So he overcame the foe, brought down the hell-brute. (1269-1274)
It's not always clear whether Beowulf is victorious because of his own strength and prowess, because of God's favor, or because he's fated to be on the side of good. Let's just say he's a very lucky guy. Grendel doesn't have a chance.
"I have wrested the hilt from the enemies' hand, avenged the evil done to the Danes; it is what was due." (1668-1670)
The battle between good and evil is a necessary part of Beowulf's life; it consists of fighting for justice, for "what was due" to a people who have suffered wrongs. Notice that, in this passage, good is not just the opposite of evil – good is actually the process of avenging evil that has been done in the past. That's a dangerous belief, because it leads to unending feuds and wars among the different Scandinavian and Germanic tribes.
Thus Beowulf bore himself with valour; he was formidable in battle yet behaved with honour and took no advantage. (2177-2179)
Late in the epic, we learn that Beowulf is not just good at fighting – he's also morally good. He doesn't take undue advantage of his enemies or his friends. But that's almost an afterthought; it's much less important to the storyteller than his prowess in battle.
After many trials, he was destined to face the end of his days in this mortal world; as was the dragon, for all his long leasehold on the treasure. (2341-2344)
The final climactic battle between good and evil in Beowulf results in a draw: Beowulf destroys the dragon, but receives his death-wound in the process. We realize that, without Beowulf, the Geats will be attacked from all sides, and we wonder whether his heroic deeds have really created any lasting good in the world. Beowulf certainly hopes they have, but the future looks somewhat bleak.