I don't know about Obama's religious preference but I have a feeling it's more complex than theist/atheist.
Obama is a TCK - a "third culture kid" - actually, he's even more than that as he is of mixed-race parentage. Third culture kids are kids who are born of one parentage but grow up in one, or many, other cultures during their formative years - they are part of, but still separate from these cultures. In essence, they mesh their experiences into a third culture that manages to encompass their rather far-ranging experiences. It often makes for a unique world view once you come back to the culture of your "origin".
You can read an interesting article about Obama being a TCK and what it means for his politics and philosophy here:
http://www.esquire.com/blogs/politics/barack-obama-opinions-062110
I know a lot of TCKs - being one myself. Many, many of my TCK friends go into fields that involve community-building, mediation, comparative studies (religion/philosophy, etc.), and a host of other professions where one is constantly weighing the various merits of the options or figuring out the "whys" of certain behaviors, etc.
I know for myself I am the only child of a Jack Mormon and a non-baptized Catholic. I've attended a Catholic school, Islamic school and Buddhist school. I classify myself as a freethinker or humanist.
I have had instances where I've told proselytizing individuals that I'm an atheist and had the woman fall back and hide her child behind her. Another proselytizing pair is totally fascinated with me - while they know I'm not turning to any kind of religion, I am, to use their words, "pretty ok for an atheist". (yes - I sometimes use the word atheist as many folks don't get "freethinker" or "humanist"). And I'll also say that, as part of a permaculture non-profit, I've done a LOT of work with religious organizations - and I am upfront about my "freethinker" status.