New buildings give you new residents. Your defense level is related to the population of your Kingdom and can’t be lower than the number of residents.
Thus, in order to construct a building, you should reach the defense level that is equal to the number of residents which will come to your Kingdom with the new house. For example, to build a new Private House which will bring in three residents, your current defense level must be at least 3 points higher than your current number of residents.