Cake and cupcake crusts have a tendency to become sticky if the weather is humid or if you've made minor errors in the baking process. This makes adding the icing difficult and may make the cake taste slightly soggy. Making sure the cake is fully cooked before you take it out of the oven is the biggest factor in making sure the cake doesn't become sticky, but you can use other tricks, too.
Take the cake out of the oven.
Set the cake on top of the stove or counter and let it cool or move it onto a cooling rack, depending on the recipe's instructions. It should be at room temperature before you wrap it or frost it.
Sprinkle some powdered sugar on top of the cake to help absorb some of the moisture if the cake is a little sticky.
Trim off sticky areas from the cake before frosting.
When you store a cake that hasn't fully cooled, the moisture evaporates and sticks to the top of the container or wrapping. Then, it condenses back down onto the cake, making it soggy. After baking cupcakes, remove them from the tin but leave the paper liners attached. Place them on a cooling rack to let the air circulate.
If the weather is exceptionally humid, freeze the cake and frost it while it is still frozen. Measure your ingredients carefully when baking so the moisture level is right from the start. Use an oven thermometer and check carefully that the cake is fully cooked before you remove it from the oven.