The perspiration exuded from the body is warmer than the outside temperature (generally) so cools down the skin. This is important as it cools down the underlying blood vessels so keeping the blood at the right temperature.
When water evaporates it requires 2.2 million joules of heat energy per kilogram of water. Evaporation of sweat causes cooling as heat energy is absorbed from your skin. When the humidity is very high, the sweat can't evaporate and you stay hot and sticky.