Not much in terms of necessities, anything you have in your possession from trained soldiers to militia. Time can be spent to fortify any position you can think of if you have....imagination to do so.
Here is a look at tactics for preparing a defense:
-Siege weapons that you have (ie balista...) should always try to take out the opposing siege weapons, remember, the more active weapons the enemy has at their disposal, the more possibilities there are for success.
-Numbers are your best friend while defending. Even militia can serve well in a defense because they take up space on the ramparts and tire out your enemy.
-Archers, the more the better. The most simple way to kill your opponents minions is with a long ranged specialist. Crossbows work just as well.
-The most efficient way to stop an attack in it's tracks is with mages. More rare than any other troop type mages are devastating against slow targets such as siege towers and ladder carriers. Unfortunately they do not have the range of archers so you will have to wait until the enemy is close to get a god effect and they are often really badly armored so let them do their job and then pull them back.
-Sortie: In siege warfare, a sortie, or sudden issuing of troops against the enemy from a defensive position, can be launched against the besiegers by the defenders. If the sortie is through a sally port, either to sortie or to sally can be used. For those who don't understand that, a sortie is a sudden and swift attack made by the defenders where they rush out of their defensive positions and surprise the enemy...hopefully(can be dangerous if not done successfully).
-Being stuck between a rock and a hard place sucks, being between a stone wall and an opposing army sucks even more! So a good tactic is to send for help from an ally, get them to attack the assailants from behind and there you have it, almost 100% chance of destruction or surrender.
A final note to all those defending a city: ALWAYS have a good supply of food and water on hand in case of a siege.