Throughout human history there have always been innocent people who have been falsely accused, tried in absentia, and then persecuted unmercifully for crimes they didn't commit. Whether the crime itself is a heinous crime against humanity or merely a minor transgression against individuals, the injustice and suffering of the falsely accused always hurts - deeply.
Sometimes it seems to the innocent party that there is nothing he or she can do to change the situation - the accuser is immovable, has a closed mind, and doesn't believe mercy is appropriate. The problem of what to do, of how the accused can prove innocence to those who are so thoroughly prejudiced is a most distressing problem, especially when the penalty for the supposed crime is extreme.
That's the problem expressed in Psalm 7. I think we may safely assume that the reason such a problem has been expressed in the form of a worship song is simply that the solution to the problem lies nowhere but in God, the just Judge Who alone can deal with it effectively. Since therefore the psalm reflects the one practical relief, the one and only hope for all falsely accused persons, it's ultimately a song of prayer and praise to that God of hope.
It begins with simple request: "O Lord my God, in You I put my trust; save me from all those who persecute me; and deliver me . . ." Then follows a beautiful expression of trust in that omniscient and perfectly just God. The psalmist knows he can leave his case in God's hands with confidence. He can say, "O Lord my God, if I have done this; if there is iniquity in my hands...let the enemy pursue and overtake me, and lay my honor in the dust!" And two verses later, in a similar vein, he can say, "Judge me, O Lord, according to my righteousness, and according to my integrity within me." He could only say such things if, 1) he was truly innocent, and 2) he knew God knew him completely.
Though the prayer is David's prayer, yet he's not thinking of himself alone. He is aware, apparently, that the rest of the people also know he is innocent. So he asks for relief so that the "congregation of the people will surround You. For their sakes, therefore, return on high." In other words, in asking God to "return on high," he's asking Him to make His just presence known so that the people will see it and will praise Him, and so that they'll renew their own confidence in the justice of their God.
David expresses to God the lesson such justice on God's part would be for the people. He says, "For the righteous God tests the hearts and minds . . . is a just Judge, and God is angry with the wicked every day. If he does not turn back, He will sharpen His sword; He bends His bow and makes it ready. He also prepares for Himself instruments of death; He makes His arrows into fiery shafts." The lesson is that God's justice is real and that He really cares about affairs of justice for people in this world.
Then, leading the worshippers to exult in that justice, David sings, "Behold, the wicked brings forth iniquity; yes he conceives trouble and brings forth falsehood. He made a pit and dug it out, and has fallen into the ditch which he made - his trouble shall return upon his own head, and his violent dealing shall come down on his own crown." Upon seeing this justice on God's part, the conclusion must be praise to such a righteous and caring God. He says, "I will praise the Lord according to His righteousness, and will sing praise to the Name of the Lord most High!"
How is your life? Do you need vindication? Have you been falsely accused? Do you want others to know how just and righteous your God is? This is your song.