Genesis 3:3 KJV
But of the fruit of the tree which is in the midst of the garden, God hath said, Ye shall not eat of it, neither shall ye touch it, lest ye die.
So they knew that they shouldn't eat from the tree (they were told) and that there was consequences if they did (they may not have understood the "lest ye die" portion or even what death was). Eve knew that it was a bad deal though because that was her argument to "the serpent". Of course in this case it was not a physical death, but the death of innocence.
Not my thing (I'm not Abrahamic either) but bear in mind that the God of Abraham did not need much of a reason to punish someone. Remember Job. A good guy, God liked him and yet He let Satan step all over him just to prove a point... to Satan who God should have told to "shut up and leave my people alone" instead of letting his adversary put one of his followers through the grist mill for no reason.