
If anyone turns a deaf ear to the law, even his prayers are detestable (Proverbs 28:9).
I like how this Proverb makes it crystal-clear that obedience and repentence are necessary elements of a healthy prayer life. We can so easily separate these things out -- following God's commands, repenting when we've made mistakes, and praying -- so that when they are grouped together it feels like repressive religion.
But the way I see things, it all comes down to classic relational dynamics. God is not particularly vengeful or vindictive; he's just a person.
Say I had a close friend who was going out with a girl and had been head-over-heels for her, convinced that he was going to marry the girl someday... but then they broke up. A painful, messy break-up. Now, if I had an interest in the girl -- but I didn't talk this through with my friend -- wouldn't I be a jerk if I just made a move for her without considering my friend's feelings? And how much more of a jerk would I be if we had talked about the situation and my friend had specifically asked me not to pursue the girl out of respect for our relationship?!? Should I expect that I'd be able to meet up for coffee with my friend, say with the new/old girlfriend at my side, and just try to launch into conversation "just like old times?" That would be weird. Inconsiderate. Inappropriate. Any way you slice it, that would be an odd interaction. We might be able to get somewhere if I came into the conversation with my most profound apologies and promises of reform for the future. But even then, we'd have some weirdness. Because I deliberately disregarded my friend's feelings and acted contrary to his (spoken or unspoken) expectations of our relationship. I turned a deaf ear to his pain, his passion, and his clearly-expressed preferences for how I would handle the relational dynamics.
God has been pretty clear in his expectations for our relationship with Him. The Bible makes it perfectly clear what His standards are. And we’re not going to be able to launch into a deep, heartfelt conversation with God until after we’ve apologized for the ways that we've disregarded his commandments. Fortunately, God is full of grace and mercy. If we confess our sins, He is faithful and just to forgive us our sins and to cleanse us from all unrighteousness (1 John 1). But we need to realize that our prayer life is affected by our willingness to obey God's Law, or at least to realize when we've failed and repent, asking for forgiveness. When we go to God in prayer, we need to start with realizing and recognizing the things that we’ve done wrong in our relationship with God -- the sins that get in the way of us having pure, meaningful heart-level interaction with God -- and then, as things come to mind, we can tell God that we’re sorry. Ask for forgiveness. And do our best to listen and comply next time.