Temperature affects the rate of sugar dissolving in water. Higher temperatures increase the kinetic energy of the water molecules, causing them to move faster and collide more frequently with the sugar molecules. This results in a faster rate of dissolving.