In Genesis, the first (and for a time only) rule God gave Adam and Eve was not to eat from the tree of Good and Evil. On one level, this seems contradictory -- if Adam and Eve had no sense of good and evil prior to eating from the tree, how could they have known it was good to obey God's rule about not eating it? But perhaps the notion of good and evil that they learned from the tree is not so broad. I speculate that the good and evil in question are what the results of this quiz
call "moralizing" -- that is, considering things to be morally wrong that don't harm anyone. Adam and Eve's life in the garden was completely without moralizing. God gave them no other rules.
We may perhaps presume that God did give them some instrumental instruction that wasn't recorded in the Bible -- helpful knowledge about how to meet their needs in Eden, since humans don't come pre-equipped with instincts and Adam and Eve had no parents. This is perhaps reflected in God's statement that they could
eat any of the other plants in the garden. They weren't allowed to eat the animals, as demonstrated by the fact that God adds meat to the menu after Noah's flood. But the statement is made in a positive way -- "if you're hungry, here's some good options" -- rather than a moralizing way -- "don't eat meat!" and the later shift to omnivory is in similar terms, rather than the lifting of a ban. The result of this is that Adam and Eve would have seen following God's advice as a pragmatic issue, justified by its consequences, rather than orders to be followed because God said so. For this reason they would have presumed the rule against eating from the tree of good and evil to be a similarly good piece of advice. And in light of the problems created by the human tendency to moralize, it was good advice.
The snake played on this pragmatic conception of right and wrong. It told Adam and Eve that eating the fruit would make them as wise as God -- by their pragmatic standards, they would gain God's full understanding of how the world works, and the consequent ability to maximize their own interests by skillful interaction with that world. But they got even more -- they got God's ability to make, rather than simply discover, right and wrong. The ability to make something right or wrong regardless of its consequences, regardless of the real world's adjudication of whether it "works," is the ability to moralize. (I see eating the fruit as a metaphor for activating their inherent ability to moralize rather than gaining a new ability. In a sense eating the fruit was a moralizing act -- putting their own judgement above God's sound advice. But on the other hand, if their trust in God was based only on pragmatic inference, it's hard to fault them for being open to the possibility that God's advice was fallible, especially since the snake offered a seemingly good argument.) This is captured in Adam and Eve's first act after eating the fruit: making clothes. Clothes would serve no purpose in Eden, and thus God hadn't instructed them in making clothes -- and indeed, they say they made them because they were ashamed at their nakedness, not because they were cold or wanted to pass the time by playing dress-up.
Of course, one power Adam and Eve didn't get was the power to give their moralizing actual natural consequences -- for example, to make wearing clothing that covers your genitals be actually beneficial by, say, creating a species of genital-biting flies that need to be warded off. At best they could impose social consequences, deliberately meted out punishments. After this episode, God seems to follow suit (perhaps figuring a moralizing God was the kind of God Adam and Eve wanted). Not content with allowing their own moralizing to bring them problems (such as the effort they wasted on making their leaf garments), God punished them by throwing them out of Eden. Throughout the rest of the Old Testament, God loves imposing seemingly arbitrary rules, to be followed "because God said so." Violating these rules has bad consequences -- such as invasion by foreign armies -- but they're always consequences that God imposes, not consequences that naturally follow from the misconduct.
There's moralizing in the New Testament as well, especially in the writings of Paul -- hence, perhaps, the strongly moralizing attitude of many contemporary Christians. But I tend to see those elements as what the human writers brought to the story. Jesus' central message of love is, as I see it, a rejection of the moralizing brought about by the fruit of the tree of good and evil, and a return to a consequentialist ethics. As John Stuart Mill pointed out, the golden rule and the idea of loving your neighbor as yourself is in essence a summary of utilitarianism, the quintessential consequentialist ethical theory. Perhaps this is the way to understand how Jesus undid Adam and Eve's sin.