To answer the second question, of course, depends on how one defines effective. If by "effective" I mean that prayer focuses someone's mind on God (Lewis posited that the main point of prayer was changing the one praying), steers my thoughts away from self-interest and toward the needs of others, and can offer a sense of peace to the one praying or the one being prayed for, then, yes, prayer is effective. But verses like "The prayer of a righteous man is powerful and effective," "Whatever you ask in my name will be given to you," and "The prayer offered in faith will make the sick person well" suggest that the efficacy of prayer extends beyond practical benefits. Obviously, there are caveats for the aforementioned verses. For example, the passage from James about the sick person being made well has to be balanced against the inevitability of death. Nonetheless, the biblical writers contend that prayer can, and does, elicit a response from God.
So, let's return to the first question: How do you know if a prayer has actually been answered?I've noticed that often our prayers are so vague that we can assume there's been divine action with basically any positive event--"Lord, be with so and so," "Lord, bless so and so." What exactly do we mean? Do we even know? Whatever the answers to those two questions, I don't believe we can point to a beneficial circumstance in someone's life and say, "Ah! That's an answer to my prayer to bless so and so!"
The deeper issue here is that if we earnestly expect God will answer such prayers or any other kind, then we're inclined to interpret anything as a sign of His response. To use a rather poor illustration, think back to when you had a crush on someone. You analyzed everything that person did when interacting with you, looking for some sign that he or she reciprocated your affection. And, if your high school or college days were anything like mine, there were times that your desire for a sign led to misinterpret the person's intentions, finding a reciprocated interest where there wasn't one.But what about something with specificity? Let's say we pray for someone to find a job, and the person gets hired. Prayer answered? Maybe. Jobs are part of everyday life. Most people looking for a job hard enough find one eventually. Generally speaking, I don't see how finding employment is any sort of proof of God's intervention.
I've written several posts regarding theodicy, butting my head against the pervasiveness of suffering. But a tangental frustration that arises from theodicy for me is that if God demonstratively healed people, then such healing would be proof of the efficacy of prayer. However, as I've noted before, we all have increasingly long lists of sick people we've prayed for who have died, and the recuperation of the few who haven't died can't be cleary attributed to divine intervention (I've never known a cancer patient who recovered without medical treatment.)
I confess I've spent very little time in prayer in recent months.