In terms of nature; sugar is different from rock candy. The difference between ordinary refined sugar and rock candy is as much as that between naturally slowly crystalized sea salt and iodized salt. Iodized salt is ” saltier ” in comparison with sea salt. Similarly, you can eat more rock candy for same amount of sweetness, as compared to refined sugar.
Another example is ice and water. Both are identical, but ice has anti-inflammatory properties, while water does not.
When we heat a sugar or a candy and burn it up, the nature of the sugar changes. The sugar is a hydrocarbon substance which is a combination of hydrogen, carbon, and oxygen. This brown substance made up from burned sugar is named caramel which is chemically and physically different from sugar and even its taste is different.