Scholars have speculated for years the reason why God did not accept Cain’s offering. It is important for us to remember that speculation is a BAD method of interpretation. The text doesn’t say that Cain’s offering was deficient in some way, but Abel’s offering is described as being the best of what he had (first born cattle, fattest portions), Cain’s offering was not described in this way. This of course could be a commentary on the kind of worship and sacrifice that God wants from his people, he wants the very best of what we have, however, it may still be difficult to draw this conclusion because it does not say for sure why God does not “look with favor” on Cain’s offering. If we’re going to assume anything we should assume that that information was not important for what the author was trying to communicate to his readers.
This begs the question, what was the important idea communicated by this narrative? I think that the clearest explanation is that this is a narrative about the destructive nature of Sin. This narrative sets the stage for a long history of violence within the world. There is pride there is jealousy, and there is murder. Cain did what he wanted to do, not what God asked him to do (Genesis 7). Sin is a potent enemy and just as with Cain, sin crouches at our doors as well, but we must to our best to master our desires to do our own will.