in defense, the more knights you have the more damage you inflict to the attacker making him think twice next time if its worth wasting troops for a handful of supplies or gold - they are quick and can hit the enemy in the second turn, if you add a bunch of catapults or trebuchets, I think not only you inflict heavy damage but you have a big chance to win regardless of the troops they send.
[that as long as the admins are kind enough to fix that bug that defense troops get damaged in case you win, im waiting for only a few weeks, hope they fix it by christmas, it would be a nice gift - ie. now i just been attacked and 2 of my knights are damaged and had to replace them]
also cavalry is useful if you meet an opponent who has siege weapons or ranged for defense.
in conclusion, having a building of knights or heavy knights is a plus, you never know when you going to need them