It's a good question and certainly worth figuring out as part of external considering and strategic enclosure, since the answer could cause you grief with the person asking, or it could cause them distress, depending on their beliefs. However, if they are genuinely curious and have an open mind, it might be a great opportunity to share ideas. So, as seems to be the consensus, it really depends (especially if they're holding a rope with a noose at one end).
Depending on who's asking, I might reply with the question, "why do you ask?", which helps me figure out what they're fishing for. Sometimes that response leads to some very interesting conversations.
Or, I might reply yes, but I don't believe in religion. If they are curious about that reply, I point out the amount of wars being started by religion and fought in God's name, and the irony where each side believes God is with them and they are therefore fighting on the side of righteousness. Then, I might point out that Christinaity, for example, has several factions (Baptist, Lutheran, Roman Catholic, United, etc.) ranging from ultra orthodox to quite liberal. They all believe in the same God but rarely agree on anything else. If the same God presents himself differently to each Christian faction, then maybe it's the same God that presents himself differently to all people, regardless of their religion. Of course, that's blasphemy n some circles.
Sometimes I've stayed out of trouble by merely saying, yes, I believe in a higher power and leaving it at that without and further description.
If the person is being really bold, then I might act offended and say that it's a deeply personal matter. However, it might be fun to put on a Forrest Gump voice and say, I was taught it was rude to ask about a person's age, their income, how they vote, their sexual preference or their religion, thank you very much.
Gonzo