How could God hold Adam and Eve accountable for sinning when they didn't know evil? Until Adam and Eve ate from the tree of the knowledge of good and evil, how could they know that disobeying God was sinful, as they didn't understand that it was evil? Why does God hold them accountable for sinning when they didn't know what evil was?
James 4:17 states "Anyone, then, who knows the good he ought to do and doesn't do it, sins." (NIV)

Adam and Eve knew what they should and shouldn't do.  God made it very simple: "but you must not eat from the tree of the knowledge of good and evil." (Gen 2:17 NIV)  It was clear that they were to avoid that tree.  As James 4:17 states, they knew what to do and didn't do it and became sinners as a result.