According to the Purdue University College of Science, sugar dissolves easily in water due to the fact that sucrose molecules are held together with weak intermolecular forces. The energy produced when these molecules bond with water is more than enough to offset the energy needed to break those bonds in the first place.
Sucrose molecules contain a number of polar oxygen-hydrogen bonds, each with an effective positive or negative charge. In a sugar crystal, a number of sucrose molecules are held together by attraction between these polar bonds, with negatively charged bonds attracting positively charged bonds and vice-versa. This attraction holds the sugar together in solid form, but when sugar enters water, the polar bonds of the water molecules begin to pull away and separate the individual sucrose molecules. The force of attraction between the water molecules and the sucrose is greater than the attraction between the sucrose molecules and each other, causing the individual molecules to separate and bond with the water molecules. When this happens, the sugar dissolves into a solution. Heat and agitation can speed up this process, encouraging the relatively weak intermolecular bonds between the sucrose molecules to separate. Up to 1800 grams of sucrose can dissolve into a single liter of water before it becomes too saturated to hold more.