“So it came about in the course of time that Cain brought an offering to the LORD of the fruit of the ground. Abel on his part also brought of the firstlings of his flock and of their fat portions. And the LORD had regard for Abel and for his offering; but for Cain and his offering He had no regard. So Cain became very angry and his countenance fell.” Genesis 4:3-5
There are five types of offerings laid out in Leviticus chapters 1-5. Of these, it appears most likely that Abel is offering a peace offering (from the flock, and including the fat), and Cain is offering a grain offerings, or perhaps a type of guilt offering.
In reality, the laws concerning offerings have not been given yet, at least in the scriptures. We do not know if God gave Adam and Eve any specific instructions early on, since it is not recorded, but we cannot rule that out.
There has been much speculation on why Abel’s offering was accepted but Cain’s was not. Here are some possibilities:
1) Cain’s offering may not have been of the ‘firstfruits’. We do not know for certain if this is the case, though we do know that Abel’s offering was brought from the firstfruits of the flock.
2) To test Cain, to see how he would handle the circumstances. This is potentially evidenced by the verses that follow where the LORD warns Cain that if he does not do well, sin is crouching at the door (Gen 4:7).
3) Cain may have already been jealous or angry at Abel for some unnamed reason. This too is evidenced by the verses that follow in Genesis 4, but is also backed up by the words of Jesus in Matthew 5:23-24, which reads:
“Therefore, if you are offering your gift at the altar and there remember that your brother has something against you, leave your gift there in front of the altar. First go and be reconciled to your brother; then come and offer your gift.”
It is also interesting to note that this portion of the sermon on the mount begins with the statement “You have heard that the ancients were told “YOU SHALL NOT COMMIT MURDER” and “Whoever commits murder shall be liable to the court.” but I say to you that everyone who is angry with his brother shall be guilty before the court.” The entire passage from Matthew 5:21-24 seems quite applicable to the story of Cain and Abel.
I think it is noteworthy that Cain brought an offering from the ground, which was cursed through Adam, and would not produce fruit without the striving of the man. Abel on the other hand, brought the firstlings of his flock, which were not cursed like the ground. This concept may also explain, in part, why the loin coverings Adam and Eve made for themselves (from fig leaves) were not sufficient (due to the ground being cursed). So instead, God made them clothes from animal skins (the animals not having been cursed.) There is likely the element of the shedding of blood for the remission of sins too, but the cursed ground may be a factor.