"...and whatever we ask we receive from him, because we keep his commandments and do what pleases him." (1 John 3:22 ESV)
This is something I've struggled with... what does it mean to please God? And, given the continued presence and taint of indwelling sin upon all my thoughts, motives, and deeds, how can I actually do anything that is acceptable to God?
This is helping bring clarity: Kevin DeYoung's The Hole in Our Holiness: Filling the Gap between Gospel Passion and the Pursuit of Godliness. (Crossway, 2012) Here are some highlights...
It’s one thing to be humble about our piety. It’s another to think piety is impossible. The truth is God’s people can be righteous—not perfectly, but truly, and in a way that genuinely pleases God.
But God does not expect our good works to be flawless in order for them to be good.
Our good works are accepted by God, not because they are “wholly unblameable and unreproveable in God’s sight,” but because God is pleased through Christ to accept our sincere obedience, although it contains many weaknesses and imperfections.
But as born-again believers, it is possible to please God by his grace. Those who bear fruit in every good work and increase in the knowledge of God are fully pleasing to God (Col. 1:10). Presenting your body as a living sacrifice pleases God (Rom. 12:1). Looking out for your weaker brother pleases God (14:18). Obeying your parents pleases God (Col. 3:20). Teaching the Word in truth pleases God (1 Thess. 2:4). Praying for the governing authorities pleases God (1 Tim. 2:1–3). Supporting your family members in need pleases God (5:4). Sharing with others pleases God (Heb. 13:16). Keeping his commandments pleases God (1 John 3:22). Basically, whenever you trust and obey, God is pleased.
There is no righteousness that makes us right with God except for the righteousness of Christ. But for those who have been made right with God by grace alone through faith alone and therefore have been adopted into God’s family, many of our righteous deeds are not only not filthy in God’s eyes, they are exceedingly sweet, precious, and pleasing to him.
Some Christians are prone to go on lengthy idol hunts and can’t feel good unless they feel bad about something.
You have permission to see evidences of grace in your life. You are allowed (and expected) to be obedient. You will never be perfect in this life. You cannot do anything to earn God’s love. But as a redeemed, regenerate child of God you don’t have to be a spiritual failure.
So... God sees me united to his beloved Son. Jesus' righteousness is perfect and I am being gradually transformed into his perfect image. And because of Christ's death (not only for my sins but also for my imperfect works) he can look beyond (see through) the imperfections and take pleasure in the intent of my renewed heart, and accept my attempts to trust, love, and obey him.