1 John 1:7 but if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus his Son cleanses us from all sin. 8 If we say we have no sin, we deceive ourselves, and the truth is not in us. 9 If we confess our sins, he is faithful and just, and will forgive our sins and cleanse us from all unrighteousness.
We will always be a sinner in this life, and so we constantly need a way to come back to God even though we sin. Prayer requires a unhindered communication between us and God, sin frustrates that path. So God make a provision through His son, so we could come back to God even after sin. So now the way is clear for our prayer.