To keep this from becoming a theism/atheism discussion ( I can give you a good message board for that), let's get back on topic.
I once heard that John Quincy Adams was an atheist, but that was prolly wrong, heh.
I believe an atheist could be elected President, if he clearly showed he was big on national security and state's rights (not trying to impose any strange atheist policies onto the states
. )
The majority of US folks may believe in a deity, but I don't think a good candidate running for office who didn't have a religion would be tremendously hurt by it.