The difference of the conductivity between sugar and salt is that salt is an ionic compound, therefore when placed in a polar solvent, like water, it will dissociate and release ions into the solution, these ions carry charges, and these charges will make the solution be able to have a high conductivity, being able to turn on a lamp for example. For sugar is different, sugar does not dissociate into ions, but it will just dissolve in water, not releasing charged ions in the solution, therefore sugar will not conduct electricity.