The God who knows our sins
O God, thou knowest my foolishness; and my sins are not hid from thee. Ps. 69:5
I find this very encouraging, that God knew the folly and wrongs of David. Why? Because, despite this, David still knew he could pour out his heart to God. He didn't think he had to hide or ignore his sins in order to approach God. He didn't have to put on an air of respectability or fake righteousness to come to God in prayer.
People are not like this. If your closest friends knew everything about you, they probably wouldn't like you anymore. If they could peer into your heart, they might become disgusted. But God does see everything about us. He peers into our hearts. "The eyes of the Lord are in every place, beholding the evil and the good" (Prov. 15:3). As the catechism puts it, "Nothing is hidden from God."
And despite this, God loves his people. David goes on to say:
The humble shall see this, and be glad: and your heart shall live that seek God. For the Lord heareth the poor, and despiseth not his prisoners. Let the heaven and earth praise him, the seas, and every thing that moveth therein. For God will save Zion, and will build the cities of Judah: that they may dwell there, and have it in possession. The seed also of his servants shall inherit it: and they that love his name shall dwell therein. (Ps. 69:32-26)
David was confident that the God who knew his sins would hear him and not despise him. Of course, we know why God does this. He does this because his people are righteousness - not with a righteousness of their own, but with the righteousness of Christ. God made his Son who knew no sin to be sin for us, that we might be made the righteousness of God in him (2 Cor. 5:21). The gospel - the salvation wrought by Christ for us - is therefore the basis of our prayers, and is why, with David, we can come with boldness to the throne of grace to find mercy and find grace to help in time of need (Heb. 4:16).