Sugar is neither an acid nor a base. Pure sugar, or glucose, is a neutral substance. A neutral substance is a substance that does not exhibit acidic or basic properties. Neutral substances like sugar do not trigger a reaction on a Litmus paper.
Generally, an acid contains hydrogen, and a base contains hydroxide. Acids in solution ionize to produce hydrogen or hydronium ions. Likewise, bases ionize to produce hydroxide ions. Table sugar contains hydrogen and hydroxide within the molecular formula. When sugar is dissolved into water, it does not dissociate its constituents. The molecules stay intact and do not produce free hydrogen or hydroxide ions.