This can happen when the sugar reacts with the air since sugar attracts moisture. If it’s humid they might be sticky on top. Don’t worry, they’ll taste equally delicious! Either frost them sticky or trim the sticky tops off using a sharp knife.