There is an issue that often surrounds the subject of prayer, namely one issue is sin. The scripture tells use that one of the hinderances of prayer is sin, as indicated in the following passages.
"Isaiah 59:1 Surely the arm of the Lord is not too short to save,
nor his ear too dull to hear.
2 But your iniquities have separated
you from your God;
your sins have hidden his face from you,
so that he will not hear."
"Psalm 66:18 If I had cherished sin in my heart, the Lord would not have listened;".
"Proverbs 28:13 Whoever conceals their sins does not prosper, but the one who confesses and renounces them finds mercy."
From these three passages and others, we can see the damage that sin does to our relationship to God.
Not only does it hinder our relationship to God, but also it hinders our relationship to friends and family. Of course, you are still able to talk to your family, but your relationship is not going to feel comfortable, because you have hidden something you have done to them but once you admit your wrongdoing, the relationship is restored.
God doesn't accept any worship or honour any prayers if the person is living in delibrate unrepentant sin, so what are we to do? Well, we need to repent from our sins, amend our ways and our doings and come back to God, then he will answer us and show us compassion of mercy. David in Psalm 51 admits wrongdoing to God and finds release from his pain and comes back into reconcilation with God. When you are living in sin, do you feel unclean trying to draw close to God? Well, repent and he will gladly accept it and forgive you.
It's like the Old Expression "Confession is good for the soul", Bottling things up inside us is indeed a horrible thing, Especially since it's eats away at us, it pricks us, it hurts us, it even can make us ill along with almost ceaseless occupation of our mind. Once guilt has been admitted, all these feelings melt away. But again, think how much more you sins will melt away after putting things right and admiting wrong to the Lord. As Jesus said "If the Son sets you free, you shall be free indeed" (John 8:36).
Do not despair, "Though your sins are scarlet, they shall be white as snow" if you repent towards God.
May the Lord cleanse us every day in every way and help us to strive for holiness.