Sugar dissolves in water because both substances are polar substances. Water dissolves the majority of substances that are polar or ionic. The fact that sugar dissolves in water is unusual because most molecular compounds are nonpolar and are not water-soluble.
Sugar is a molecular compound, which means it is comprised of covalent bonds by which the atoms in the molecule share their valence electrons. This is the opposite of ionic bonding, in which atoms donate or receive electrons and change their attractive charges individually. The type of bonding atoms undergo when they react together depends on the difference in their electronegativity values. If the difference is great, they exhibit ionic bonding. If there is no difference or only a slight difference, they form covalent bonds, with the covalent bonds becoming more polar as the difference becomes greater.
In a polar covalent bond, the electrons are shared unevenly. This creates a slightly negatively charged end and a slightly positively charged end in a phenomenon known as a dipole shift. These ends allow for intermolecular interactions and give water its properties as a solvent. Polar bonds contribute to the overall polarity of the molecule, although it should be noted that not all molecules with polar bonds are completely polar.