We take the understanding of good and evil for granted. Closer inspection of ancient authors suggest that this might not be the case. Human beings have had to learn everything, from how to stand up on two legs, how to put meaning behind the different grunts and growls we make and yes, we even needed to formulate the concept of good and evil. Unlike the previous examples, human beings learned the difference between the two relatively late in the game, the patriarchal age was set to the tone of this discussion, around 800 BCE, so perhaps a century earlier or so.
The concept of good seems to be absent in Sumerian corpus, though the formation of the concept of evil seems fairly prevalent. One can’t help but see a justification of lifestyle choice and the brutal realities of maintaining favor with the various powers that be, as being the core tenant to Sumerian/Akkadian Religion. Not to say the roots of general belief started here, just that the earliest core of belief at that time relied more on the awe and fear that the gods evoked.
Egyptian belief had a clear concept of evil and an allusion to the knowledge of good, though its place in the scheme of religion was more at the bottom of the rung as far as important concepts go. There was the weighing of the heart ceremony that was to take place after death, but the feather it was weighed against stood for truth and justice, rather than good or evil. Though evil was implied through the opposite inference of the word justice, the Good itself wasn’t entirely labeled in its own right.
Certainly one can see the emergence of the concepts in the biblical books, if understood in the order of their writing, which is different from modern day arrangements. The books of the bible were written from the 13th century BCE, to around the 1st. The book of Genesis has parts that are as old as the 9th century, but most of it comes from the 6th century exile. There in the second chapter it talks about mankind and the introduction of good and evil concepts, which demarcates a line between two of Genesis’s most prolific authors (Jahwist vs. the Elohist).
The Greeks honed in on the Good, but not until the fourth century BCE, Plato labels it in his dialogues. Though the meaning of good is interpretive, here in the dialogues we have the first real isolation of the good to be treated as a concept in its own right. Zeus was looked upon in later generations as the image of beneficent joy. The image of Zeus became so widespread that it was adopted later on as the image of God in monotheistic sense.
The Vedic religion of ancient India and Pakistan, possibly the pre-cursor to the Sumerian Religion, suffered a religious schism (an indicator of the religions ancient roots) early on, which divided the tribes into two separate belief systems, which then populated the regions of Persia (Iran) and the Hindu (India. The division brought about the demonization of the other, where the same system of belief was retained, the differences being regional, the Devas were the supreme gods of India, where the Asuras of a second rank, not necessarily demons, just not as divine as the Devas. The Persians saw it somewhat differently, they saw the Asuras as being the Supreme gods of Persia and the Devas were outright evil Demons. Persian Religion was further reformed by a prophet known as Zoroaster (another indication of the age of Vedic religion) who further divided the entire universe into two domains, corresponding directly to the concept of Good and Evil. The dualistic theology of Zoroastrianism was rather evolutionary and it is poignant to point out that it is still being practiced today, although only very sparsely. There were two Gods in Zoroaster’s universe, Ahura Mazda the benevolent God and his rival Angra Mainyu the maleficent. Hinduism would also spawn a prophet who would jumpstart a new religion, although the older Hindu belief remained, that prophet of course was the Buddha and the evolutionary contribution of that would be the non-deist philosophy of enlightenment and Nirvana.
Judaism, inspired from the biblical books, would contribute (though not the first instance) the concept of monotheism, the belief in just one god. Though the rise of YHWH to the top of the Canaanite pantheon to later denying the existence of all other gods was a slow and tumultuous process which is what led to the relatively late acceptance of the religions chief tenant, Monotheism. Christianity incorporate the concept into all the attributes assigned to God, who then is envisioned as being the image of Zeus but with a biblical voice and name.