Man created God
People have always sought for answers to great questions about how the World works. Thousands - maybe millions - of years ago, when man was young, he walked in rain wondering "where all this water comes from?" The only answer he could find was an unknown great power he called god.
As years went by and man learned more and more about nature and its laws, the jobs to be done by a god became fewer and fewer. Nowadays, I think, it's rather pointless to say "It was god who did it." Man has found different reasons for most things.
Soon man found out that (other) animals don't pray any god, and because animals seemed to be very stupid, man thought he was the best of all god created. That's the reason why we still have religions and believe in god: it's too hard to live without. It hurts to think that, actually, we are not so special, after all.
My opinion is that man created god(s) to make life easier to understand. Now when we don't really need him any more, we can't get rid of him because we are afraid for punishments... But, after all, it may be nice to think your soul will live on somewhere when your body dies.