how to make a realistic sugar cube material?
Here's what i have come up with after a few minutes of playing around.



The entire shader is based on cell voronoi textures.  Voronoi works well for this kind of thing because it gives nice pixel-like results.  The actual geometry is just a massively subdivided cube with a displace modifier using a small voronoi texture.



Here are the shader nodes:

Click to enlarge

It's basically a huge mix of diffuse, gloss, SSS, glass, and translucency; with a small amount of volume scattering (to simulate the light bouncing around on the sugar grains inside the cube).  Everything uses a single voronoi texture as a normal map, each shader uses a different level of bump though.  It could definitely use some tweaking, but it's a pretty good start.

A note on speed/noise:



First of all you have to realize that things like rough gloss, SSS and translucency will all generate a good deal of noise, meaning you need more samples.  I would suggest at least 500 samples for rendering many of these.  That said, there are a couple things that you can do to cut render times, and less render time means you can afford more samples.

First of all you can probably get away with nixing the volumetrics.  Though accurate it isn't essential to use the volume scatter, this alone cut my render time almost in half.

Second you can add these nodes at the end:


What this is doing is only making it compute all those complicated shaders for glossy and camera rays (the add node works like a logical OR), for all other rays it just computes diffuse.  I use this trick all the time in indoor scenes especially.