The popularity of tanning is attributed to fashion designer Coco Chanel, who accidentally got too much sun on a Mediterranean cruise in 1923. Since she was a fashion icon, this made the tanned look fashionable.
As an aside, the chemistry behind UV damage is interesting. You can think of DNA as a sequence of four letters: C, G, A, and T. If there are two neighboring T's, UV can move a bond, linking the two T's together (i.e. thymine dimerization). If you're in the sun, each skin cell gets 50-100 of these pairs created per second. Enzymes usually fix these errors, but sometimes the errors will cause problems during DNA replication and you can end up with mutations. Enough of the wrong mutations can cause skin cancer. So wear sunscreen!
It's too late to edit my previous comment, but I wanted to add one more random tanning fact: UV releases β-endorphin so tanning is literally addictive, to the point that naloxone will cause withdrawal symptoms, at least in mice: https://www.cell.com/cell/fulltext/S0092-8674(14)00611-4