The psalm is a psalm of David. He probably wrote this for liturgical purposes. In this psalm, David calls the Lord "God of my righteousness". God is a personal God. He is for David, not the God of righteousness, but the God of MY righteousness. He is the one who makes us righteous. He was the one who set David free when he was in distress. David recalls what God had done for him, before asking him to be gracious to him and hear his prayer. We dare to come before God because of what he did for us - not because of what we had done.
God's glory is put to shame when those who believe in him love vanity and do not seek the truth. God is glorified if those who love him do the opposite - they seek him and the truth.
God sets the godly apart as his own. God claims the godly as his own. He ensures that they are protected and he promises to hear when they call.
David warns his readers to tremble and not to sin. This is done by communing with one's own heart before sleeping and to be still. One must reflect the events of the day before going to sleep - to do an examination of conscience before sleeping. One must be still and wait for the Lord, to know the Lord.
God urges us to offer sacrifices of righteousness and put our trust in him. The sacrifices cannot be any sacrifice. It must be one of righteousness. The word righteous is repeated twice in this psalm and is therefore an important word. To be righteous is to be set right. A sacrifice of righteousness is one that sets us right before God. It is one that is not offered in pride or trust in one's own righteousness, but one that is offered in humility and trust. The God of our righteousness is the one who makes us righteous. He declares us righteous. We are deemed righteous by our faith. We trust only in God.
Many long to see some good. But the psalmist asks God to lift the light of his face on us. The psalmist calls on to God to shine his face. When God does that, he puts gladness in our hearts. Only God can give joy - more than what we can ever experience. Our only good is found in God. God is our joy!
The psalm concludes with saying that God alone makes us dwell in safety and therefore, God alone gives us peace.
Lord, let me not put you to shame. Teach me to seek you and the truth. Give me strength to say no to temptations. Let me reflect on your word and wait for you. You will not delay but will save at the right time.