if people say their prayers in Church&at home, but never feel the prescence of God when they pray they may feel there is no God listening to them. the feeling that nobody is listening to them leads to agnosticism/atheism.
unanswered prayers, are even more likely to lead people to believe God does not exist. Religious people believe that God answers prayers&they often hear about people's prayers being answered.
If their prayers to God are not answered they may feel that God does not like them/ or that God does not exist.
if somebody has been a good Catholic(going to masson sundays&holy days&living a good life following the teachings of the Church) but when they pray for God to cure their sick child, their child dies, that person may losethair faith in God.
If somebody's prayers are not answered, particulary if they are praying for something like the end of human suffering in wars droughts, etc then they might stop believing in God.
This is because they may think God could no exist if he lets such things to happen. In this way unanswered prayers can lead to a person to become an agnostic/atheist.