It is sometimes objected that humans invent God out of an intense need for a “father figure” or to console themselves. Alister McGrath cleverly summarizes the gist of this argument, “religion offers succor for suckers and losers, but not for serious and sophisticated people.” This argument finds its roots in writings of Ludwig Feuerback and Sigmund Freud.
First of all, this argument cuts both ways. If Christians created God out of a need for a father figure, then atheists can be said to have rejected God out of a desire to kill a father figure. Paul Vitz, Emeritus Professor of Psychology at New York University, has documented a connection between fatherlessness and atheism in his intriguing book Faith of the Fatherless: the Psychology of Atheism.
As for inventing God to meet our desires, maybe this is precisely backwards. Perhaps the reason humans have desires is because something / someone exists that will satisfy them? C.S. Lewis beautifully articulates this point, “Creatures are not born with desires unless satisfaction for those desires exists. A baby feels hunger: well, there is such a thing as food. A duckling wants to swim: well there is such a thing as water. Men feel sexual desire: well, there is such a thing as sex. If I find in myself a desire which no experience in this world can satisfy, the most probable explanation is that I was made for another world. Probably earthly pleasures were never meant to satisfy it, but only arouse it, to suggest the real thing.”
For more on this, see Paul Copan's That's Just Your Interpretation