Assume we know theism is true. Can we theists ever tell that our prayers have been answered? I pray for E and E occurs. Can I ever know that God acted on my prayer rather than E occurring completely independently of my prayer? It turns out that the answer is simpler than one might think, and that we can know this much more often than one might think.
Consider the property of Reasons Maximalism (RM) that an agent might have. An agent has RM if and only if whenever she chooses an action A, she chooses it on account of all the unexcluded reasons she is aware of in favor of A. Suppose, for instance, that I have a duty to visit a sick friend and I enjoy her company even when she is sick, but, on the other hand, it's a long drive and the hospital is depressing. Nonetheless, I do visit her. If I don't have RM, I might be visiting her only out of duty or only for pleasant companionship. But if I have RM, I am visiting her because of both duty and pleasant companionship. And if I have RM and decide not to visit her, then I will decide to do that because of both the long drive and the depressingness of the hospital.
I submit that God has RM. Being perfectly morally good and perfectly rational, in every decision God takes into consideration all the unexcluded reasons he has. Of course, in the end, it may not be possible for him to act on all the reasons, because some of the reasons will pull in different ways. But his choice will have been made on the basis of all the reasons he is aware of in favor of it. Moreover, in the case of an omniscient being, the reasons she is aware of in favor of A is the same as the reasons she has in favor of A. Thus, God chooses A on the basis of all the unexcluded reasons he has that favor A.
Now, that I've requested something good and grantable is always a reason to grant the request. In rare cases, it will be an excluded reason--perhaps I earlier authoritatively commanded the person to stop granting my requests for a day. But I cannot think of an exclusionary reason God might have against considering our requests for good things. (If God promised not to hear our requests, that would be an exclusionary reason, but he made no such promise.)
I don't know exactly how to analyze "grantable". One class of non-grantables are states of affairs ruled out by divine promises. Another class of non-grantables are states of affairs that cannot be brought about, whether because they are metaphysically impossible or because they are metaphysically necessary. It may also be that people's free choices are non-grantables. However, perhaps when we pray that x (where x is not God) might freely do A, God reinterprets our prayer charitably as a prayer that x be given lots of reason to do A, and that is a grantable. I do not know whether things that God has already promised are grantables, but I am inclined to think they are (cf. the sick friend visit case).
So, our requests for grantable good things are always an unexcluded reason for God to grant the request, and God being omniscient is aware of this. Moreover, God is a concurrent cause in all good events (in fact, in all events, because evil is a mere privation, but nevermind that), so that all good events count as caused by God. Therefore, by RM, if I pray for grantable good, and God brings about the request, then God produces the good in part because of the request. So, a sufficient condition for my knowing that an event has happened as a result of my request is that (a) I prayed for it, (b) it was good, (c) it was grantable and (d) it occurred.
In particular cases, these conditions are very commonly satisfied. If you pray for someone's safety during a trip, and she returns safely, she does so in part because of your prayers. If you pray that you find a lost object, and you do find it, you find it in part because of your prayers. If you pray that a friend might recover from an illness, and she recovers, she recovers in part because of your prayers.
Now, you might say that because of the "in part" this is unsatisfying. You might want to know when it is that God grants it solely on account of your prayers. Assuming the thing you prayed for was good, the answer is: never. If it was good, then God had a reason to bring it about, and by RM if he brought it about, he brought it about in part because it was good. The one exception would be if there were an exclusionary reason, such as a divine promise that he will only bring this good about as a result of prayer. But Revelation does not, I think, tell us that God has such exclusionary reasons, and we can reasonably presume he doesn't. So it is never the case that a good you prayed for was granted solely because you prayed for it.
But perhaps you want to know something else: You want to know if it is the case that the good would not have been granted had you not prayed for it? Well, sorry: this can only be known if Molinism is true and God reveals it to you. But I think Molinism is false. Given the falsity of Molinism, there will be no facts of the form: The good would not have been given had you not prayed for it. For had you not prayed for it, God would still have had the reason in favor of it given by the fact that it was good, and he still might have acted on the reason. That said, sometimes you can know that the event would still have been given--for instance, when the event was promised by God. However, you can never know that the event would not have been produced had you not prayed for it, when the event is good. (I leave open some questions about praying for neutral and bad things.)
Can we ever know that our prayers have not been granted? Maybe not. For it seems reasonable for God to grant our prayers by giving us something greater than what we prayed for, something we weren't wise enough or knowledgeable enough to ask for. Suppose George has a flu he knows about and an undiagnosed cancer he doesn't know about. He prays to be cured of the flu, but instead God cures the cancer. That's better than what George asked for, and George cannot complain that his prayer has been unanswered. Any substantive good in curing the flu is there in the curing of the cancer, and if George had known he had the cancer and had any sense, that is what he would have prayed for the healing of. In that case, George's prayer was, arguably, answered, but George cannot know how it has been answered. Though if he is a Christian and reflects on Scripture, he can know that it has been answered somehow. And of, course, healing faults in the soul would be even better than curing the flu or healing a cancer.
None of the above provides an atheist with a reason to think prayers have been answered. But that wasn't the question I was asking.