Your Castle Defense Bonus goes towards improving the defensive performance of any Units you have in your Castle. Upgrade your Walls and build Fortifications to increase your Castle's overall Defense Bonus.
The Castle Defense Bonus works as follows: every 100 Defensive points increase the Defensive characteristics of your Units by 1%.
Remember that the Castle Defense Bonus is applied only to the Troops located within your Castle, so if you haven’t got any troops there, you won’t benefit from this bonus.