Candy may separate as a result of the butter and sugar not combining correctly. Be sure to melt your butter and sugar on a medium heat so they melt together. If the heat is too high, the butter may melt before the sugar and therefore, separate from the sugar.