In other words, how do we know that God granted us a blessing because we asked for it, and not just because He was going to do it anyway? An interesting question, a little deeper than you get in Sunday School, and right up the alley of the wacky guys at Christian philosophy blog The Prosblogion:
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 [“Reasons Maximalism,” but of course, you already knew that – j], 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.
There’s more, of course.