Since time immemorial, human are facing several mysteries and miseries. During prehistoric era people lived as nomads and they faced the forces of nature such as weather, floods or droughts.
At some point in time—we do not know exactly when this happened—people in various far-flung parts of the world developed an instinct. Whenever people encountered some power beyond their control that could harm or help them, they began to worship that power. They believed that worship protected them and sought the blessing of that power. For worship, priests all over the world devised more or less similar methods such as folding their hands, bowing, kneeling, floral offering, prayers and sacrifices. Priests taught these to the masses and gradually designated the powers as gods.
For example, climatologists have identified an Ice Age, one that stretched approximately between 30,000 BCE and 10,000 BCE. Humans, living during the Ice Age, had largely inadequate protection against the extreme cold: they were at the mercy of available sunlight, and that was inconsistent and beyond their control. In this scenario, people began solar worship and that was a logical outcome. In a similar manner, humans considered thunder and lightning as devastating, mysterious and frightening. Consequently, their leaders or priests imagined a divine sky god that was behind the changes occurring in the sky. Gradually, they began worshipping the sky as a god. There is enough historical evidence to assert that the ancestors of Hindus, Buddhists, Jews, Christians and Muslims worshipped the sun and the sky, before their religions came into practice.