How to make a material for a candy cane?
The biggest difference between your render and the picture is that the picture has a ton of things (esp. lights) to reflect all around, while yours has only one lamp and its specular highlight. Add an HDR image to the background and your render will look lightyears better.

See tip 3 here for examples:

http://www.blenderguru.com/articles/making-better-materials/

See this site for some free, quality HDRs:

https://hdrihaven.com



One other thing is that in the picture there is a little gap between the red and white whereas yours cuts cleanly. Perhaps add an extremely thin black line there, or use the striping as a bumpmap.