I'll start getting my head around the whole thing once I have control of a settlement or two, but I'm sort of guessing people have already done a fair bit of analysis on optimizing this sort of thing?
I haven't done that optimization, but to be fair it is not that useful as you
will have to sacrifice population in order to have a large city that is able to produce high-tier equipment.
Should I be building defenses?
Every settlement would benefit from a palisade. Other buildings that provide defense help with economic security, as soldiers do. Usually your population will increase (due to increased economic security, which affects the % of productivity wasted) when you have between 50 and 100 militia in your settlement (the better equipped the soldiers, the higher the economic security). Militia produces half the resources than peasants, so at some point past that more militia in a settlement will decrease your productivity.
Soldier equipment? What's the best soldier combo?
Broadsword-Plate-Warhorse. Of course, there are currently less than 300 soldiers with warhorses in the entire game (out of a total of almost 140k soldiers in the entire game, not counting rabble), so you will likely have to do with less.
Here you can see the equipment reference:
http://mightandfealty.com/en/info/equipmenttypesAs a guideline, the more lessons to train, the better the equipment. The system is very simple, and a sword will always be better than a halberd which will always be better than an axe.
The best combination depends on what resources you have available, and how long are you willing to wait (you will find that training naked axemen is fast as hell, but they die like flies).
Resources?
Small settlements tend to produce more goods, and large ones more wealth. Wood serves mainly for buildings, bows, leather armor and whatnot. Metal for heavy armors and metal weapons. Food for horses and population.
Food tends to be the most expensive resource in the game, followed by metal (though this depends on the area, in some places metal is so abundant that it's worth less than wood, while on others it's worth more than gold).
It's building an inn and mason in my settlement; should I be reallocating to something like the market?
The peasants have certain fancies, and after a certain population level they will build things they find useful for themselves, sometimes not so much for you. Try reducing the amount of workers in those buildings, but don't be surprised if they are increased again in a turn or two.
Markets are great. They increase production of every resource that you already produce, so they are always worth it.
And should I just set building to 0% for the buildings I don't urgently need, while focusing 10% workforce on the important ones?
A building with no workers assigned to it will deteriorate until it's gone. Assign at least one worker if you wish to put the project on hold.