There are two basic reasons why God accepted Abel's offering and not Cain's:
- The nature of the offerings themselves
- The the spirit in which the offerings were given
1. The nature of the offerings
The problem with Cain's offering was not that it was a grain offering rather than an animal, or blood, offering. Grain and wine offerings were commanded by God in many places in the Old Testament, and were perfectly acceptable to God.
Rather, the problem was that Cain brought a random offering:
Cain brought to Jehovah an offering from the fruit of the ground.
(Genesis 4:3)
Whereas Abel gave the firstborn and best of his flocks:
Abel, he also brought from the firstborn of his sheep, their fat
portions. (Genesis 4:4)
Offering the firstborn, or firstfruits, and the best, to God was acceptable in honoring God. Bringing just any old common offering was not.
2. The the spirit in which the offerings were given
Abel gave the firstborn and best of his flocks because his offering was made from faith, love, and thanksgiving to God.
Cain showed by his subsequent actions that his offering was made from a jealous heart and a lack of faith.
Here are two different angles on Cain's state of mind and heart from the Epistles in the New Testament:
By faith Abel offered to God a more acceptable sacrifice than Cain's.
Through this he received approval as righteous, God himself giving
approval to his gifts; he died, but through his faith he still speaks.
(Hebrews 11:4)
and
We must not be like Cain who was from the evil one and murdered his
brother. And why did he murder him? Because his own deeds were evil
and his brother's righteous. (1 John 3:12)
The writer of the letter to the Hebrews emphasizes Abel's faith, in contrast to Cain's implied lack of faith.
The Apostle John emphasizes Cain's evil heart and evil actions in contrast to Abel's righteous heart and actions.
If we put these two perspectives together, and read the rest of the story in which God remonstrates with Cain, but in his jealousy Cain goes ahead and kills his brother anyway, we can see and understand that Abel's heart and mind were good, but Cain's heart and mind were evil.
Here is God's remonstrance with Cain, illustrating this:
And Jehovah said to Cain, "Why are you angry, and why has your face
fallen? If you do well, will you not be lifted up? And if you do not
do well, sin is crouching at the door. His desire is for you, and you
must rule over him." (Genesis 4:6-7)
God said this to Cain after Cain's sacrifice was not accepted, but before Cain killed his brother Abel. God knew what was in Cain's heart when Cain made the offering, since:
God doesn’t look at things the way humans do. Humans see only what is
visible to the eyes, but the Lord sees into the heart. (1 Samuel 16:7)
Summary
- God accepted Abel's offering because it was was a proper offering of the best of Abel's produce, made from a heart, mind, and life full of faith, love, and righteous deeds.
- God did not accept Cain's offering because it was an ordinary and therefore improper offering, made from a heart, mind, and life full of jealousy, lack of faith, and evil deeds.
For a fuller analysis and interpretation of the story, see my article "The Cain and Abel Story: Does God Play Favorites?"
For a long, detailed analysis of the Cain and Abel story from the perspective of a Jewish Rabbi who has carefully studied the Hebrew text, see "The World’s First Murder: A Closer Look at Cain and Abel," by Rabbi David Fohrman. The link is to the final installment. To read the full article from the beginning, scroll to the bottom and follow the links at the end of the article in reverse order.