Sugar is an example of a crystalline solid that is soluble in water. It can dissolve faster in hot water than cold water because there is more energy in the hot water molecules. Because they are moving faster, they have more energy to break the bonds holding the sugar together. There is also more energy available to break the hydrogen bonds holding the water together.
When a substance, or solute, dissolves, it homogenously distributes into another substance, the solvent. It takes energy for the internal structure of the solute to break. It also takes energy to break the bonds holding the solvent together. New molecular bonds form between the solute and solvent. However, for certain combinations of substances, the energy released as one dissolves into another is greater than the energy it costs to dissolve. When this is true, the solute is soluble in the solvent.
Temperature is a physical property. It can change without affecting the nature of a substance. Temperature is defined as a measure of the average energy of the molecules in that substance. In a fluid-like water, this translates into each molecule moving at a higher velocity. When one molecule bumps into a second molecule, some of that energy can be transferred. This energy can break intermolecular bonds, like the ones holding crystals together, or the hydrogen bonds between water molecules.
Sugar is an example of a solid that is soluble in water. In its solid form, it forms a crystalline structure. Breaking this structure takes energy. While it is energetically favourable for sugar to dissolve in water, it will occur faster in hot water. There is more energy in hot water, so there is more energy available to break up the crystalline structure. This same principle helps explain why mixing a glass with a sugar cube in it will increase how fast it dissolves. Stirring adds energy to the system.
There is a limit to how much of one substance will dissolve into another. This is called saturation. The saturation point of a solute in a solvent is dependent on the physical conditions of the system. Temperature and pressure can both influence saturation point. When opening a can of a carbonated beverage, the pressure drops, and the saturation point changes. The gas in the system exceeds the saturation point, and it comes out of solution as bubbles.
Not all substances will dissolve more or faster in a warmer solvent. A commonly observed example of this is oxygen in water. In the summer, when the top layers of the water are warmer, fish are more frequently found at the bottom streams and lakes. This is because they seek the oxygen-rich portions of the water. Even dispensing water from the tap, you can see that hot water will sometimes have bubbles while cold water does not. This happens because with the hot water, the gases are coming out of solution.