Man created God.
Humans are hard-wired to be curious, we seek explanations behind things.
When we don’t find those explanations,
the mind forms it’s own conclusions as a way to satiate that curiosity.
Early humans didn’t have the right explanation as to,
how the Sun affects life on Earth, why rain happens,
why thunderstorms, who created the Earth and so on.
They formed conclusions of a universal force that was controlling their lives and surroundings.
God became a way to explain these phenomena.
Most religions have a concept of a ‘Eternal Divine Light’
somehow related to god, or the god itself.
The Byzantine mystic, Saint Symeon,
revealed a more fundamental meaning when he described the Divine as,
“A light infinite and incomprehensible…
one single light…
eternal…the source of life.”
Sounds like our Sun?
God also became an explanation for life and death,
to console the relatives of the deceased that
‘the person is now at a better place with god’
and that they were not alone,
‘god is with them’.
People hate the feeling of being left alone.
Not everyone can take the responsibility of the
dire circumstances caused due to their poor decisions.
It is easier to shift that blame to someone else.
It becomes ‘god’s will’ and that
He has already chosen a path for us,
these circumstances are just a test for us.
There are many such things.
As centuries went by,
cults and religions came into existence
to give people a sense of belonging with like-minded folks.
With that also came the godmen,
messengers of this god who could form a direct connection to god.
Religion evolved as a common ground to make it easier
for leaders to control a large number of people.
Till today, it’s one of the best ways to divide and rule.
Religion has a very deep hold on people and hooks them emotionally.
You may present all facts to a religious person about evolution,
any evidences of thousands of year old fossils, everything.
But they won’t let go of their religion,
because letting go would mean whatever they believed upto now was false,
about death of their dear ones - that they are not at any better place
they are just dead,
about god ‘always walking along them’ to ‘guide their path’ ‘god loves them’ ,
all of this will be falsified and they will suddenly ‘feel’ alone.
Religious people are emotionally attached to god, facts won’t affect their ‘faith’.
So, in my opinion, god is a creation of man’s imagination.
Whether it’s psychologically useful or not, I’m not sure.
P.S: This answer was compiled from multiple sources like
Quora and certain other websites.