Prayer.
Watching an atheist criticise prayer is similar to watching a drunken arts student criticise the engineering techniques required to build a skyscraper. Entertaining perhaps, but the lack of interest, experience and training, as well as a decent dose of arrogance makes it a farce
Because they really don't understand what they're talking about, they often use mockery is a tactic. It's hard to take seriously anybody who mocks, which is a form of bullying and only impresses the weak.
Prayer occurs in the context of a relationship between a Christian and God, in a world which has not turned out as God intended to be. When man chose to disobey God, and continues to choose to disobey God, evil results. It is not God's fault, and blaming him is pointless. God has given prayer to believers as a way of changing events or preventing evil happening. Prayers are not “demands”, God is a person who is free to do what he considers best, he's not a computer programmer or a trained monkey. He will always answer genuine prayers, either immediately or later.
But there are several conditions which you need to understand.
Perhaps the common is reason that atheist prayers are not answered is because they do not have any faith. In fact that is the commonest reason of anybody's prayers not being answered.
Atheist is also fail to appreciate that God does not “cast his pearls to the swine”, i.e. give his best stuff to those who only wish to mock. Those who mock will only receive the simplest warning only, the sign of Jonah. Whilst Jesus spent some time with the mockers of his day (Pharisees), they did not receive any answers to their prayers. Nothing. Rather, Jesus preferred to be with those who knew they had problems and were prepared to ask and particularly have faith in Him. He often told them to keep quiet about their miracle, their answered prayer. And that's where you should go and look today if you want to see answered prayer, i.e. particularly in the Third World. If you don't go and look by visiting active churches in the poor neighbourhoods of the planet, then you can't complain if you don't see anything.
To have your prayers answered you need access to God. No access, no response. You can only gain access to God if you have accepted the sacrifice of Jesus as payment for your sin, and humbled yourself, accepting Jesus as Lord of your life, denying yourself and your selfish motivations.
You need to believe that He exists, and that He rewards those who seek him. Respect the Man.
Before God can forgive you your sin and answer your prayer, you need to have forgiven those who have sinned against you. Unforgiveness is an enormous barrier to prayers being answered.
You need to have given up selfishness as a motive for your behaviour and prayers. Christianity is not a path to wealth, but God can bless financially if he choses, and does promise to provide all the material needs for those who put Him first in their lives.
And a track record of good behaviour, doing what God wants in this world, matters tremendously. Isaiah 58 reveals that people who love and share, fight the good fight against injustice of all varieties will have God answer “here I am” when they call.
All this enables you to pray according to God's will. We do not always know what is going on, sometimes people are “taken away” (die) to be spared from evil (Isaiah 57), sometimes God has other plans that we do not know about. The Bible is full of examples of people interacting with God; each one reveals something worth knowing. Sometimes a group of believers is necessary, or even some fasting. God always responds to prayers from humble, as opposed to arrogant hearts, but His timeline maybe longer than an impatient heart may wish.
Prayer is one of the great privileges of being a Christian, and answered prayer one of the great delights.