The molecules in the sugar move from an area of higher concentration (sugar cube) to an area of lower concentration in the water.
That is exactly what diffusion is: the net movement of molecules or atoms driven by a gradient , which means that it doesn’t requires energy.