If your infantry is far inferior to the enemy, there's little point trying to defend the walls. Stick your archers on the wall, and just sacrifice a unit or two of infantry to shield them from any enemies that may climb the walls. Most of your infantry should guard the streets. Your archers can attempt to burn siege towers, but I've found it much harder to do that than previously. It's best to have them use normal arrows on the enemy infantry first, and if you do attempt to burn the tower with their arrows, wait until the tower is at the wall. I found in the past that's the easiest time to set towers on fire, but since BI, I've had limited success. Get your archers off the wall when it looks like the enemy infantry will overrun the walls and have them take cover in the streets. Often archers are more deadly firing up at enemy attackers on the walls.

If you have good cavalry, you can set up killing zones in the streets. A unit of spearmen in guard mode will temporarily halt an enemy charge, and you can manoeuvre your cavalry to strike the enemy units from behind. A bit like in the picture below. Luring the tired enemy into killing zones is a great way to turn battles around.



Sometimes you need to do a bit more manoeuvring before the enemy falls for your trap, but it's a good tactic to employ.

If things look bleak, pull every unit back to the town square. They can't rout in the square, so will fight to the death whilst the enemy wilts and hopefully runs.

If you have lots of cavalry, sometimes it's worthwhile sending them out the side gates to tackle enemy units still trying to access siege equipment.