Many physical and chemical reactions are affected by temperature. Usually higher temperature causes the reaction to occur faster, and lower temperature will slow it down.
Water solubility (the ability of substances to go into solution in water, i.e. bond with water molecules) is a reaction that is affected by temperature for many substances. Changes in temperature may increase or decrease the solubility of a certain substance in water, depending on the substance properties.
Since high temperature will cause water molecules to move around relatively faster, it will also cause the hydrogen bonds between them to form and break at a higher rate (that is why hot water vaporizes more quickly than cold water). In addition, the high temperature increases the water's energy, and this energy may be used to break bonds between dirt and curtains for which colder water will not have enough energy.
This means that the detergent/water solution will be able to dissolve (form bonds with) the dirt faster and better, because the bonds between the detergent and water and the bonds between the detergent and dirt will form faster and will be strong enough to prevent the dirt from reforming the bonds with the curtains. As mentioned earlier, these bonds will also break faster, but the presence of a detergent helps to stabilize the solution and keep the dirt dissolved in the water. Once the dirt is dissolved in the water, the curtains are clean, and the dirty water can be easily discarded.
In summary, hot water helps the cleaning process (i.e. moving the dirt from the curtains to the water) because it can dissolve the dirt faster and break strong bonds (up to a limit, of course) of dirt with the curtains.
It is worth mentioning that between the detergent and the hot water, the detergent contributes more to the dissolution of dirt in the water than does hot water alone (that is the same reason it is better to wash your hands with soap and water than with water alone). However, for optimal results, using both detergent and hot water will clean the curtains better (and faster).
Here are some images I found online that may help clarify this point: