This psalm was evidently composed by David to fulfil a vow of praise made during times of hardship. Many lament psalms use the appeal that if God delivers the person from trouble then he will declare the goodness of God openly before the assembly of God’s people (e.g. Psalm 22:22). The individual thanksgiving psalms were often written to fulfil vows like this by giving detailed testimony of what God had done before the assembly (Psalms 40, 77, 116 etc.). In this case it is probably not an individual but the people as a whole who are giving thanks for a communal prayer that had been answered. They credit God as one who hears prayer and as a result of their testimony they envisage all people turning to the God who is so ready to hear and answer prayer. He a merciful God who not only forgives sin but answers prayer ‘with awesome deed of righteousness.’ The God who created, controls, and cares for the natural world is ready to wield his power for those who seek him. As he ‘cares for the land and enriches it abundantly’ so too does God care for his people and bless them abundantly.
Psalms like this were and are instrumental for building the faith of God’s people. This psalm embodies an important act of confession given to us to sing again and again in order that our faith might be fed by a testimony of God’s willingness of hear prayer. God wants all people to seek him and this psalm is an invitation to do so in the assurance that God will hear and answer.