Several times a month, in a conversation that has nothing to do with religion, I get asked whether I believe in God or not. I get asked this by people who are theists and people who are atheists. Maybe this happens to a lot of people, but I suspect that I am asked for three—interrelated—reasons.
First, you don't have to know me very well or even in person to know that I am curmudgeonly and contrary. I am critical. I criticize religious believers—something agnostics and atheists pick up on—and I criticize atheists and agnostics—something religious believers pick up on. So, people see criticism and think that means we are on the same team.
But, as I was telling students just this week, I am as likely to criticize you because I agree with you but I think your arguments are bad, as I am to criticize you because I think your conclusions are wrong. I would rather disagree with someone but respect her reasons than agree when the reasons are bad. (At least, I aim for that.)
I wouldn't want to follow him in every way, but the Danish philosopher Kierkegaard, as committed a Christian as there may ever have been, joined an atheists' group precisely because he thought they took their beliefs more seriously and with more thought than his coreligionists.
Second, I teach philosophy. (I strive to be a philosopher, but like happiness for Aristotle, that is an accomplishment of a whole life.) Many people make assumptions about what it means to care about philosophy. Surely, if I care about philosophy, they think, I must be an atheist. There is something silly in that assumption, since the long history of philosophy is filled with believers of some sort, even if only in the God of the philosophers. Of course, they also assume I must be a liberal or progressive. And, that isn't quite right either, at least not in the full political senses.
Third—and I think this is what is usually going on—this question works as a proxy.
People who tend toward the non-theistic side are sometimes using this question to guarantee that another person is rational or logical or believes in science. Of course, we all know or should know that religion and rationality or logic or belief in science are not inconsistent. If you think they are, you have to explain people like Georges Lemaître, just to give one example. And, if you think that belief in science makes one rational, to stick with examples from cosmology, you will have to explain Sir Fred Hoyle.
People who tend toward the theistic side are often using this question to gauge their interlocutor's morality. "Do you believe in God?" functions like "Do you believe in right and wrong?", "Do you think morality is objective?", etc. Of course, we don't have to work too hard to find a slew of examples of immoral theists. (For those atheists, who might want to jump in here, there is plenty of evil on the godless side, too.) And, much of the greatest parts of the Western and Eastern intellectual traditions have worked—both in theistic and atheistic strains—to demonstrate that a morality derived wholly from the existence or commands of a God is something less than morality.
Whatever the real meaning of the question, the rolling of the eyes that begins if I actually try to explain what I believe shows that my interlocutor rarely wants to know.