Abel's sacrifice was accepted by God because it was made according to God's instructions. Cain, however, tried to approach God in his own way and was rejected by God (Genesis 4:3-5). From that point on, Cain became a symbol of those who try to approach God on their own terms.
