This is based on the assumption that sugar causes obesity - I don't think there's any strong evidence for that, or that low carb diets work better for fat loss than low fat, from what I've seen both have same effect (calories equated) and both have equally terrible long term adherence/outcomes. Sugar seems like a nice villain but it's more likely that you'd have to tax any high calorie food that tastes good.
Fair enough, guess my problem would be that since these things would be implemented by politicians it would end up being driven by fads/popular opinion, and without strong evidence (of which there's very little) you'd essentially be conducting population level experiments even if you wanted to be scientific (eg. food pyramid to the extreme)