Philosophers usually assume that a prayer is effective if and only if God brings about the thing requested because of the prayer, so that had the prayer not been offered, the thing in question would not have occurred. So if you pray to God for rain tomorrow and it does rain tomorrow, this all by itself is not enough to say that your prayer for rain was effective—it must also be the case that God actually brought about the rain at least in part because of your prayer. If it would have rained anyway, without your prayer for rain, then it doesn't seem that your prayer for rain was effective. So an effective prayer would be a prayer that made a difference by influencing God to act. (For more on this question, see Flint 1998, chapter 10, and Davison 2009.)
I agree with this except for the last sentence. An effective prayer must make a difference,in the counterfactual sense of what would otherwise occur absent prayer, but not in the sense of influencing God.
Which sets the stage of the main issue:
Would it ever be possible to know or reasonably believe that God has answered a particular petitionary prayer? Different authors disagree about this question. Some theists think that for all we know, for any particular event that happens, God may have had independent reasons for bringing it about, so we cannot know whether or not God has brought it about because of a prayer (as opposed to bringing it about for some other reason—for more on this argument, see Basinger 2004 and Davison 2009). This line of thought is especially interesting in light of the recent popularity of so-called skeptical theism, which responds to the problem of evil by claiming that we can never know exactly how particular events are connected with each other and with good or bad consequences, some of which may be beyond our understanding (see McBrayer 2010, Other Internet Resources). Others argue that as long as people are justified in believing, in general terms, that God sometimes answers prayers, then it is possible to believe reasonably that one's petitionary prayer has been answered when one knows that the thing requested has come to pass (see Murray and Meyers 1994, Murray 2004).
i) Certainly there are cases in which it might be ambiguous whether or not the outcome is in answer to prayer. Instances in which it might have happened anyway, absent prayer.
ii) That said, it's a false dichotomy to say that if God had an independent reasons for bringing it about, the outcome wasn't in answer to prayer. A given event can serve more than one purpose in the plan of God. Events have both short-term and long-term consequences. In Calvinism, everything is coordinated, so something can be an answer to prayer, but have an additional purpose further down the line. And it could still be contingent on prayer, even if it has intended effects that go beyond what the supplicant had in mind.
iii) Whether an outcome is identifiably an answer to prayer also depends on the specificity of the prayer, and/or the improbability that this would happen anyway, apart from prayer.