hi teagranny,
My understanding runs along similar lines as what juvenissun, has written. Surely, we can all understand that 2 or 3 pages of written text is not the full account of God's dealings with Adam and Eve or Cain and Abel. The Scriptures tell us that Adam walked with God and so, yes, I'm confident that there was a lot of information and conversation made with Adam, Eve, Cain and Abel and probably even others of the first generations that we are not privey to. The Scriptures also tell us that Enoch the seventh from Adam also walked with God and then God took him.
So, as to how Cain and Abel knew to make sacrifices I can only imagine that that was discussed in one of their conversations with God or them with Adam who had gotten it from God.
As to why Cain's sacrifice was unacceptable, yes, we also have to make some assumptions about that, but never should we not understand that whatever the reason it is a righteous one and God was right in denying Cain's sacrifice. One thing to consider that goes along with what has been mentioned here regarding the quality of the 'first' fruits or animal to be sacrificed is the sacrifices of Israel and of Jesus. Yes, throughout all of the Scriptures Israel was always commanded to make their sacrifice of the best of what they had, not just any or the overflow or the least, but their sacrifices were always to be the best. The passover lamb had to be a lamb without spot or blemish.
So, since we aren't privey to the actual conversation or command that led Cain and Abel to make sacrifices to the Lord we can't be absolutely sure what the failing in Cain's offering was. Another point is the heart of the one making the offering. The Scriptures speak of when we make an offering that we also must have a pure heart and the conversation between God and Cain after the fact of Abel's murder would seem to indicate that God knew that Cain's heart wasn't pure either. So, there's another possible reason that his sacrifice may not have been acceptable.
God bless you.
In Christ, Ted