The idea of heaven and hell is pretty much embedded in outlook of social life and has been accepted since time immemorial. I have summarized them civilization wise as below:
Mesopotamian / Sumer civilization (4500 BC):
Mesopotamians believed in netherworld which is equivalent to hell. It was a dark place with no return. However, there were no punishments or torture. It was supposed to be just a place that is dull and mundane. There was no concept of heaven as well. Everyone who dies and have proper burial / funeral will be transported to netherworld. There will be 7 gates to the netherworld and the dead will transition after judgement from court of the Annunaki.
Indus Valley Civilization (3300 BC)
As most of the artifacts of this civilization were destroyed, there is not much reference to give clear indication. For a fact, people used to burn the dead or dispose them into forests for animals to eat them. It is also found that some people used to bury the dead as well or place ashes of the burned into pots. They used to worship animals and all objects of nature and otherwise. Traces of the traditions and custom can be found in modern Hinduism and Buddhism. They too had an idea of heaven (swarga) and hell (narka). The soul leaves the body and reincarnates itself based on the karma (deeds) of the person. If karma are good, reincarnation happens in a form of a human body else in a form of an animal or other creatures.
Egyptian Civilization (3100 BC)
Egyptians regarded death as a temporary pause to life. They believed in absolute idea of immortality. After death, Egyptians were mummified, food and drinks were placed in their chamber and they were laid to rest. texts with prayers were also placed so dead can reach paradise swiftly. The dead has to pass to hardships to reach Hall of Osiris where judgement is passed. 42 gods listen to the confessions and place heart of the dead on a scale opposite to a feather. If weights on the scale balance, the dead has achieved immortality otherwise they will be devoured by Amemet.
Mayan Civilization (2000 BC):
The Maya believed in dark afterlife. The concept of “Underworld” was similar to the modern concept of hell. Maya believed that most have to go through torment by mean gods in order to avail fruits of paradise. Only women who died in childbirth and people sacrificed for the will of god were exempt to the torment. Besides, Maya also believed in concept of reincarnation.
Roman Civilization (26 BC)
Hades, was considered as god of underworld. On death, Romans were taken to Avernus, which is cave and entry to the underworld and were dropped to river Styx that flowed through the underworld. Subsequently, they will be judged and sent to either Elysian fields, Tartarus or the Asphodel fields. The Elysian fields was pure paradise with green fields and sun light for the brave heroes. Asphodel fields were middle ground for Roman’s who have engaged in equal amount of good and bad throughout their life. Tartarus was part of underworld where dead were tormented for their sins.
Aztec Empire (1100 AD):
Aztec borrowed from Maya however, there were additional details on the built up of underworld / hell and heaven. Aztec believed in multiple levels of both hell and heaven. Type of death will determine the level of afterlife. Death while fighting for society will provide a coveted level of paradise and death due to crime will take you to a undesirable level of hell. Aztec also believed that Sun required blood of human sacrifice in order to rise next day so they used to organize human sacrifices in the temple everyday.
Inca Empire (1400 AD):
Inca were strong believers in the afterlife. They preserved and mummified bodies of the dead. They used to keep servants to watch over dead and bring gifts to dead on regularly. The heaven and hell were divided into 4 segments. If died leading a helpful life for the society, would end up in part of heaven where there is sun to shine and plenty of food and water. Hell / underworld on the other hand was cold with no food.
Humans always had fascination for immortality. The idea of hell reinforced civil and helpful behavior within the close knit society. There were no other incentives for protecting or helping others so these ideas helped in the progress of the civilization and encouraged working with cooperation.