Along with a phosphate ion and nucleobase, a sugar (more precisely, a monosaccharide) forms one of the three components of a nucleotide. In nucleic acids, only ribose and deoxyribose appear, but more generally, monosaccharides form a wide array of organic compounds, including sweet-tasting crystals like glucose and fructose.
Monosaccharides mostly have the chemical formula