Eve knew it was wrong for the same reason she explained to the serpent; God told her.
God knew exactly where Adam and Eve were when he said, "Where art thou". What God was asking was "Where are your heads"; what were you thinking?
Yes, How was Eve to know! First off, how can one believe that if God knew the end of time from the beginning, is all-knowing, and in sovereign control of His creation (except our will)(he can be very persuasive to change that tho) how could he not know exactly what would happen? And yes... tell someone ‘no’ and that’s what they did. (This is a biblical, God’s Word principal in Romans where law and grace are explained... and that the law is used by God for a purpose... to show us we cannot keep the law... and now we start realizing apart from the Grace of God in Christ we are unable to BE sinless... Anyway... what I wanted to say... yes, something about Eve being off the hook. Read Gen.2-3 carefully and you’ll see Eve was not created when God GAVE ADAM the rules about the garden. I’m sure this changes theology a little...