Sugar soap is actually caustic soda, or to give it its proper name sodium hydroxide.
Main use domestically is to wash down surfaces prior to painting to provide a clean, grease free, (ack breezer) surface for the paint to adhere to. Also removes silicon or wax based polishes, which can cause problems if not removed prior to painting. Wearing of gloves and eyesheilds is advisable, especially if being used above shoulder height.
But I'm afraid you're partially incorrect.
"Sugar Soap" is a bit of a catch-all term. The chemical composition is down to the manufacturer and tends to have different ingredients, in different parts of the world.
Trisodium Phosphate has been used widely in the US, for example.
Sodium Hydroxide has traditionally been used here, but isn't very common now - although it is still around...
As with most chemicals, if you don't know exactly what you are dealing with, read the instructions / download the MSDS.