This might help as well. I'm not sure how much this is taught across America anymore, but it was one of the first doctrines I learned.
Psalm 66:18
If I regard wickedness in my heart,
The Lord will not hear;
This passage is talking about when we pray and praise, God will not hear us if we hold have sinned against Him. So if He cannot hear us praise and ask Him, then that would cut Him off from being able to really speak to us. Because we know where God is, there can be no sin. (And yes, we have been forgiven of our sins at our salvation, I do believe in eternal security as Ephesians 4:30 says 'sealed with the Spirit' but none the less, we continue to sin against Him even after our salvation, or else Paul would not have written to Timothy saying 'I am the chief of sinners') But much like the psalmist, David, wrote many times, that he confessed his sins, and the sins of his people daily, we are called to do the same in
1 John 1:9
If we confess our sins, He is faithful and righteous to forgive us our sins and to cleanse us from all unrighteousness
The word confess there, and all the studiers of the Greek correct me if I'm wrong, means to cite or name a crime, it does not mean to declare something guilty or not guilty, it was a lawyers term. Another term to note is the word faithful, it means that God must forgive us. Whenever you read the word that God is faithful to do something, it means that He will always complete that promise no matter what we do. All we must do is confess the sins in our lives that we are aware of and then all the sins that we do not know we've commited, God will cleanse us of those as well. This then restores us to the Light (1 John 1:1-10) and our walk with God.
I highly recomend that you do confess your sins, before you read or pray or praise, and I even recomend that you confess your sins hourly if you can. I grew more in two months after I learned this than most Christians I've known.