I'm no professional historian either, but I'll try to answer your questions as best as I can
1. I don't know enough about this topic to give a reliable answer, but from what I can tell, the most basic forms of castles originalyl were little more than fortified manors of the resident lord. With increasing threats (attackers evolving from small raiding bands to proper armies), these residences underwent more and more fortification until the first motte-and-bailey castles popped up, that is, castles which had one large tower atop situated on raised earthworks (the motte) and an a courtyard that was surrounded by palisades/stone walls or a ditch (the bailey).
From my understanding (but again, I recommend looking up other sources), the bailey effectively grew larger and larger, so that the motte/keep which previously was the dominant part of the castle became less prominent. Presumably, the thick walls around and the increasing size of the bailey(s) eventually led to domestic structures being moved there from the keep, whereas the latter increasingly became a purely defensive structures to which the inhabitants could flee if the bailey itself had been breached.
Of course, the closer you were to dangers such as hostile tribes, the less resources you typically had at hand, and the less resources you have, the less you can afford to build a fortified bailey large enough to hold great halls and the like. To this end, the keep presumably retained it's role as a "fortified home" in many border regions.
2. Again, I don't really know to much about this, but one thing that came to my mind was that churches often were built from relatively robust materials (read: stone), which would have allowed them to serve as a form of emergency shelter. Some communities also built "refuge castles", that is, castle-like structures with more-or less fortified walls around them that were not permanently settled but became sanctuaries in times of war.
That being said, life as a peasant in border regions was not very nice. Just look how the Vikings could show up with their boats, pillage and rape their way through one village, and then be off again before the local lord could mount any sort of defense.
3. From my understanding, the overwhelming majority of medieval peasants were farmers, with non-food producing groups such as lumberjacks, miners, and smiths being a relatively minority.
Now, before you actually get to build your cozy little home-tower, you technically would require at least a modicum of infrastructure to already be in place - the stones and tools needed to build the tower don't pop up from thin air, after all. With video game logic, however, you could assume that the tower was indeed the first structure of the village, and the farmers built their farms and happy little shacks around it. In this case, I would recommend having peasants start as the "farmer" class while you have a limited stockpile of iron tools and other products necessary to build houses and stuff (like in the Anno games). You'd then have to make do with this basic stockpile until you can produce your own iron goods.
4. As mentioned above, stone and metals can be imported via merchants, but this will cost you. If you intend to have the game focus on relatively small communities, most of your stuff and structures likely will be made from wood, including your "castle".