Hard candies (like peppermints or lollipops) are essentially 'glass.' When sugar and water are boiled to the 'hard-crack' stage ($150^{\circ}C$ or $300^{\circ}F$), almost all the water evaporates. If the syrup is cooled quickly, the sugar molecules don't have time to form a crystalline structure. Instead, they become a 'disordered' solid known as an amorphous glass. This is why hard candy is transparent and brittle. If moisture gets into a container of everyday hard candy, the surface molecules will start to crystallize, making the candy sticky and opaque—a process known as 'graining.'