Men are not always fair in their judgements, but God is always fair. That's what this song is about. It's for all those who are unfairly judged by men, and who therefore want instead God's true and righteous judgement of their case.
So the song leader is leading those who have been unfairly judged by men. They know they're innocent of at least some of the issues in which men accuse them, so he lead them to say, "Let my vindication come from Your presence; let Your eyes look on the things that are upright."
It doesn't mean that any singers of this psalm could ever be entirely innocent before the holy God. But these are the words of a man who has already come before the Lord, a man who has agonized lest he might have sinned in some way of which he is unaware. He's already stayed awake nights, tossing and turning, considering, confessing known sins, begging the Lord to show him the ones he doesn't know. He can say, "You have tested my heart; You have visited me in the night; You have tried me and have found nothing."
Not only so, but he's been very, very careful since the problem with other people's accusations came up, trying with all his might to avoid sin of any kind. He knows he can't do it alone, though, so he seeks the only help there is. He sings, "Uphold my steps in Your paths, that my footsteps may not slip." He at least wants to be pure before the Lord.
But even after this self-examination, this careful consideration of his own actions and of God's laws, he still feels he has been wrongly accused by others. Little by little, day after self-examining day, he becomes more and more confident. Finally, he can sing, "I have called upon You, for You will hear me, O God; incline Your ear to me, and hear my speech. Show Your marvelous lovingkindness by Your right hand. O You Who save those who trust in You from those who rise up against them."
So he's finally concluded that it isn't he himself who is guilty, but instead it's his accuser. And it's an awful thing he has to behold when he thinks upon those who unjustly accuse him. He has to say, "They have closed up their fat hearts; with their mouths they speak proudly. They have now surrounded us in our steps; they have set their eyes crouching down to the earth . . . as a young lion . . . lurking in secret places."
But because he is praying to the Lord Who knows him he can sing his prayer with confidence. He can sing, "Arise, O Lord, confront him, cast him down; deliver my life from the wicked with Your sword!" These unrighteous accusers are themselves in rebellion against Jehovah, and their hope for happiness is therefore limited to this life only.
So, because their joy in their possessions and pleasures is limited to this life, they must therefore leave their treasures to their children. Not so with the righteous singer of this psalm. He can sing joyfully, "As for me, I will see Your face in righteousness; I shall be satisfied when I awake in Your likeness!"
Do these things ever happen to you? Do people sometimes falsely accuse you? If they do, remember that your Lord Jesus was also falsely accused. They crucified Him. But He arose. He sits at God's right hand, waiting until God makes His enemies His footstool. That includes your enemies as well. But there are conditions.
You need to be ever so careful to confess known sin. You need to be ever so careful not to react unrighteously toward those who accuse you. Ask Your all-seeing Lord to make you aware of your own secret faults, and then be sure to confess them to Him. Then He Who has gone before will raise you up to be with Him!