He was the first person to kill another living soul & could not possibly understand what it meant to take a life.Furthermore , I can't think of anybody who died before Abel. You can't imagine death if you have never experienced it.
Cain disobeyed and commited an atrocious sin but God really is about forgiveness and love and i expect Cain was remorseful. God doesnt destroy without very good cause. Cain didnt exactly get off with a slap on the wrist. He was banished from his home and family and he was marked, albeit to protect him. He wasnt executed but he was punished. Also God had a plan as Cains descendants far on down the road in history - cushites, hittites, etc. - are the most of the pagan peoples God led HIS people against - always victoriously.
God is a God of justice. He said Abel's blood was crying out to him (Genesis 4:10). Whatever punishment God feels is appropriate will applied in due time. At Psalm 37:9,10 it says, "For evildoers themselves will be cut off, but those hoping in Jehovah are the ones that will possess the earth. And just a little while longer, and the wicked one will be no more; and you will certainly give attention to his place, and he will not be."