I love Stephen Fry - he has a brilliant mind. It took me a lot longer than he did to realise religion is just made up ideas, and that God is simply an imaginary friend.
But praying to this imaginary friend is a bit like meditation, and can bring about answers to problems and questions. These answers come from your own mind though, not from a supernatural personage. This is why two different people praying about the same thing, will come to two different answers.
I still love old churches, and the sound of hymns on a Sunday. I wouldn't mind betting that some members of congregations no longer believe but enjoy the social gathering , the music, and the camaraderie.