Beowulf is a story that has a great many examples of the motifs of sin and religion. The tale serves several purposes.
It was told originally (we can assume) as a means of passing down history. Scops or storytellers were responsible for keeping the history of a tribe or community because things were not written down, but passed on through the oral tradition...by word-of-mouth. (At the start of the story, Beowulf and Hrothgar speak a great deal about "history.")
The second purpose of the story was to entertain. Without electricity or the ability to read, stories and music shared by the fire would often pass the time. These people greatly admired bravery and loyalty—more than power and gold. Loyalty guaranteed survival. If one was loyal to his sovereign lord, he was also greatly rewarded for his loyalty.
After Christianity arrived in Britain, these stories influenced the way people lived. Beowulf is not only a story of a valiant hero, but of a man humble to his sovereign lord and, more importantly, his God.
At the center of the story, we find a battle between good and evil, between the enemy and God: an age-old battle that started in Genesis of the Bible, describing the sin of murder—the first murder.
Grendel was this grim beast called, who haunted the moors and secluded fens; this accursed one had long dwelled with monsters since the Creator had decreed his exile. On the kin of Cain did the sovereign God avenge the slaughter of Abel; Cain gained nothing from this feud and was driven far from the sight of men for that slaughter. From him awoke all those dire breeds: ogres, elves, and phantoms that warred with God a lengthy while...
Cain committed the sin of murder; the "kin" of Cain are still paying for it. As Cain was before them, "dire" breeds (including Grendel) were cursed—exiled from God's presence.
Grendel commits the most grievous sin of brutally murdering the Danes, but there are others—"civilized" humans—who also sin in this epic tale. One is Unferth, the son of Ecglaf. His first sin is jealousy.
...he always begrudged other men who might achieve more fame under heaven than he himself.
Overwhelmed by the sin of pride, Unferth tries to insult Beowulf, insulting his victory in a tale of battle that is widely known. In addition to his sin of pride and jealousy, Unferth insults a guest—breaking a long-standing rule of hospitality. Beowulf does not fall victim to the sin of pride, to fight with him, but he does chide Unferth:
What mighty things you've just said...my dear Unferth, while you're drunk with beer!
He also reminds Unferth of his darkest sin: Unferth, like Cain, murdered his brother.
...you were the bane of your dear brother, your closest kin, for which the curse of hell awaits you, regardless of your cunning wit!
While examples of sin are present, there is the motif of service to God, a more positive aspect of religion.
For instance, when Beowulf arrives to help the Danes, the coastal guard sends them to Hrothgar's hall with a blessing:
May the Almighty Father guard you well with grace and mercy in your quest.
Preparing to fight Grendel, Beowulf puts his faith in God.
In truth, the prince of the Geats gladly trusted in his valorous might and the mercy of God!
God is a central part of the lives of the men (and women) in this tale at the time it was told (or at least when it was finally written down). The story exemplifies sin in the world, but also a love of, and respect for, God.
Beowulf is an interesting blend of paganism and Christianity so there much regarding sin about which to write. Grendel is the spawn of sin, tracing his lineage back to Cain. Grendel was enraged when he heard music rejoicing God being played in Heorot. He couldn't touch Hrothgar's throne because it was protected by God. Beowulf acknowledges God as his protector many times during the story. Sin and its effects as well as praises to God are rife throughout Beowulf.