To lick something is to run your wet tongue over it to moisten it.
Nowadays most envelopes are self-sticking. Forty years ago, envelopes had gum on them. The gum was on the edge of the flap. To seal the envelope, you had to moisten the gum with water. Commonly, this was done by licking the flap.
Boyfriends and girlfriends sometimes wrote "SWAK" on the flap of the envelope. It meant "sealed with a kiss!"
Businesses that needed to seal dozens of envelopes had little devices with damp sponges in them, so that the flaps could be moistened without having to lick them.
Postage stamps needed to be licked, too.