Both were the twin sons of Adam and Eve whom knew God.
Genesis 4: 1-2
“ And Adam knew Eve his wife; and she conceived, and bare
Cain, and said I have gotten a man from the Lord. (2) And she again bare his
brother Abel. And Abel was a keeper of sheep, but Cain was a tiller of the
ground.”
Both provided offerings to God.
Genesis 4: 3-4
“And in the process of time it came to pass, that Cain
brought of the fruit of the ground an offering unto the Lord. (4) And Abel, he
also brought of the firstlings
of his flock and of the fat thereof. And the Lord had respect unto Abel and to
his offering: