Both hot water and cold water have the ability to dissolve sugar molecules. However, hot water is able to dissolve higher quantities of sugar than cold water.
Water dissolves sugar by breaking the bonds that hold sugar molecules together, which requires energy. While cold water can do this, it has less energy available to break sugar molecule bonds than water of a higher temperature, which is why hot water is able to dissolve more sugar than cold water. There is a limit to the amount of sugar water can dissolve. Once that point is reached, the water is fully saturated.