If your candied nuts are turning out all grainy, one reason might be that your sugar crystalized too soon. This could be due to not stirring frequently enough or if your heat is too high.