Why does wood burn but not sugar?
Combustion is a gas phase reaction. The heat of the flame vapourises the substrate and it's the vapour that reacts with the air. That's why heat is needed to get combustion started.

Anyhow, wood contains lots of relatively volatile compounds so it's not too hard to get combustion started. Once combustion has started the heat of the flame keeps the reaction going.

However sugar dehydrates and emits water when you heat it. Water isn't flammable (obviously) so there's no way to get combustion started. Dehydration leaves behind pure carbon and that is non-volatile so again there's no way to get this to burn. Carbon will burn of course, but you need a high temperature to get it going.