cake batters contain quite a lot of sugar and sugar tends to attract moisture (it is "hygroscopic"). so when the cupcakes stand in a humid environment (either humid weather or a slightly steamy kitchen) they can attract some moisture and the tops can turn a little sticky.