A fertilizer is any material you put on the soil to make it more fertile. The main nutrients in fertilizer are nitrogen, phosphorous and potassium.
Sugar acts as a counter-balance to excess nitrogen in the soil. These types of soils, known as "rich" soils, promote foliage at the expense of flowers.
Carbons require nitrogen to decompose, so adding carbon-rich additives to the soil help deplete it of excess nitrogen. Wood chips are an excellent form of carbon for large areas but sugar works equally as well for small gardens.
While sugar is not really considered a fertilizer, in that it adds no nutrients to the soil, it is a carbon that will use up excess nitrogen. Use 4.5 lbs. of sugar for each 10 square feet of soil.