Abel was the second child of Adam and Eve. While not mentioned many times in the Bible, Abel is described in terms that anyone believing in God would be happy to follow. Let us look to some of the things the Bible reveals about Abel's faith.
Now Adam knew Eve his wife, and she conceived and bore Cain, and said, “I have acquired a man from the Lord.” 2Then she bore again, this time his brother Abel. Now Abel was a keeper of sheep, but Cain was a tiller of the ground. 3And in the process of time it came to pass that Cain brought an offering of the fruit of the ground to the Lord. 4Abel also brought of the firstborn of his flock and of their fat. And the Lord respected Abel and his offering, 5but He did not respect Cain and his offering. And Cain was very angry, and his countenance fell.6So the Lord said to Cain, “Why are you angry? And why has your countenance fallen? 7If you do well, will you not be accepted? And if you do not do well, sin lies at the door. And its desire is for you, but you should rule over it.”8Now Cain talked with Abel his brother; and it came to pass, when they were in the field, that Cain rose up against Abel his brother and killed him.9Then the Lord said to Cain, “Where is Abel your brother?”He said, “I do not know. Am I my brother’s keeper?”10And He said, “What have you done? The voice of your brother’s blood cries out to Me from the ground. 11So now you are cursed from the earth, which has opened its mouth to receive your brother’s blood from your hand. 12When you till the ground, it shall no longer yield its strength to you. A fugitive and a vagabond you shall be on the earth.”
4By faith Abel offered to God a more excellent sacrifice than Cain, through which he obtained witness that he was righteous, God testifying of his gifts; and through it he being dead still speaks.
31“Therefore you are witnesses against yourselves that you are sons of those who murdered the prophets. 32Fill up, then, the measure of your fathers’ guilt. 33Serpents, brood of vipers! How can you escape the condemnation of hell? 34Therefore, indeed, I send you prophets, wise men, and scribes: some of them you will kill and crucify, and some of them you will scourge in your synagogues and persecute from city to city, 35that on you may come all the righteous blood shed on the earth, from the blood of righteous Abel to the blood of Zechariah, son of Berechiah, whom you murdered between the temple and the altar. 36Assuredly, I say to you, all these things will come upon this generation.
22But you have come to Mount Zion and to the city of the living God, the heavenly Jerusalem, to an innumerable company of angels, 23to the general assembly and church of the firstborn who are registered in heaven, to God the Judge of all, to the spirits of just men made perfect, 24to Jesus the Mediator of the new covenant, and to the blood of sprinkling that speaks better things than that of Abel.
While the Bible does not tell us explicitly what was right about Abel's sacrifice and what was wrong with Cain's, we can know from the text in Hebrews 11:4 (above) that Abel's sacrifice was "by faith". When understanding Romans 10:17 properly (eg. faith comes by hearing the word of God), we can then discern that Abel heard and followed what God instructed. Conversely, Cain did not offer his sacrifice "by faith", or it would have also been acceptable to God!
Similarly, our worship to God and everything else we do should be "by faith" (i.e. according to our properly hearing and submitting to the word of God). Jesus said we show our love for God when we keep His commandments in John 14:15.
Also, we can see that although it has been many years since Abel died, his example in this acceptable worship recorded early in Genesis still speaks to us as a powerful lesson in following God's instructions in order to please Him (Heb. 11:4b).
In pronouncing judgment to come on the scribes, Pharisees and hypocrites to whom Jesus Christ spoke in Matthew 23:31-36, Jesus let them know that their actions would include persecuting and even putting to death prophets, wise men and scribes that were sent to do them good, and that upon them would "come all the righteous blood shed on the earth, from the blood of righteous Abel to the blood of Zechariah, son of Berechiah, whom you murdered between the temple and the altar. 36Assuredly, I say to you, all these things will come upon this generation."
Let us be followers of Abel's example of "living by faith"! Jesus came and died on the cross, shedding His precious blood for the sins of the world, so we can be forgiven and be right with God. We should "hear" God's instruction for us in the new covenant, and not being hearers only, we, "by faith", obey God's instruction unto salvation (See John 3:16; Acts 1-2; Col. 2:14-17; Mark 16:16; Rom. 10:9,10: Acts 2:38; Acts 22:16; I Pet. 3:21; Col. 3:17; I Pet. 1:3-25; Rom. 12:1,2; & I Pet. 4:17-19). - mjw
Passages quoted above are from the NKJV.