sin
The opening chapters of the torah present two different "models" for understanding sin. The first sin we're told about occurs in the garden, when Adam and Chava eat the fruit from the tree of the knowledge of good and bad. (Aside: does Hebrew distinguish "bad" and "evil"?) One could argue that by definition they didn't know enough to sin, but they go against a divine command and are punished, so I think we can reason that something akin to sin happened. (They were uneducated, not idiots. Even a young child can understand "don't touch that".)
The chain of events is a little fuzzy. First, Adam received the command. Then God made Chava. We don't know what Adam said to Chava about the command. The snake challenged Chava, and Chava reported that they weren't to eat or even touch it -- an elaboration not in the original instruction. Did Adam build that fence to protect Chava? Did Chava add it in talking to the snake? Was this the fist breakdown of communications (think "telephone game") in recorded history? We don't know.
We also don't know if Adam was present for this conversation. The snake gets Chava to eat it and then Chava gives the fruit to Adam. Was he there the whole time, or off tending the garden? Did she tell him what the fruit was? We aren't told.
From these events, we can conclude that sin results from breaking a commandment, knowingly or unknowingly.
In the next chapter Kayin kills Hevel, which also merits divine punishment. In this case he didn't break an explicit command, and there's been no death in the world yet so some argue that he couldn't have understood the consequences, but it seems clear to me that he was punished because he "should have known better". His was a willful act of violence, with or without intention for murder. People are supposed to intuit at least some standards of behavior and are accountable when they don't act accordingly.
This makes sense to me. We don't need to be commanded to know that murder is bad; it just is. We don't need to be commanded to know that stealing or cheating others is wrong. According to Judaism all people (not just Jews) are commanded in seven things, but Kayin shows us that even without that we're supposed to be able to derive most of the standards of good behavior.
Jews have additional commandments on top of this, and a lot of them are ones we wouldn't derive on our own. We have to pay attention to both sorts, the ones we should know regardless and the ones where we receive instruction. We can't just rely on the explicit commandments; that way lies Kayin. We also have to strive to understand good behavior that isn't spelled out -- and we'll be held accountable if we don't.
I'm not saying anything new or surprising here, but I wanted to record these thoughts anyway.
(Coincidentally, this Shabbat I'm reading the part about Lemech, who according to tradition killed Kayin.)

no subject
The torah doesn't always relate things in chronological order, but I think it's always worth considering the p'shat when that's feasible.
If you go looking in any of the classical sources, I'd be interested in what you find.