The Psalm 79 is a reminder of the destruction of the Kingdom of Judah at the hands of Nebuchadnezzar, tyrant of the Babylonian empire. The Babylonian empire, just as had happened with the Assyrian empire, made fear and cruelty the means to achieve power so that no one dared to oppose them. The Kingdom of Judah paid the consequences for its sins and errors, just as had been announced by many prophets.
This Psalm was almost certainly written during the Babylonian exile, or during the rebuilding of the second temple. The Psalm is also a reminder that the Kingdom of Judah was destroyed as a consequence of breaking the Lord's law and losing the fear of God, and not because of Nebuchadnezzar's pride and ambition, the Babylonian empire had been chosen by God as an instrument of destruction, and that in the face of this, great is the love, the wisdom, and mercy (compassion, kindness) of God.
This is why this prayer to God begins with a reminder that Israel was still, in that situation, the people chosen by the Lord:
"O God, the nations have invaded your inheritance;
they have defiled your holy temple,
they have reduced Jerusalem to rubble" Psalm 79:1.
The Psalm continues, pleading with God that the Israelites had become a laughingstock to their enemies, and that the God of Abraham in His wisdom could not forget His children; therefore, the Psalm continues with an invocation to His divine justice:
"Pour out your wrath on the nations
that do not acknowledge you,
on the kingdoms
that do not call on your name" Psalm 79:6.
And then the Psalm continues with a request that recalls the law of sowing and reaping, which was indeed fulfilled because just as the Babylonian empire arose, it disappeared in the same way, and with these words, the invocation continues:
"Pay back into the laps of our neighbors seven times
the contempt they have hurled at you, Lord" Psalm 79:12.
The Psalm ends with the hope of divine salvation, which effectively ended with the arrival of Cyrus the Great, who was anointed by the Lord to fulfill God's plan. The Psalm teaches that faith in God should never be lost, even in the most difficult situations.
For more information, check out my profile, follow the link, and download my ebook.