Tanning is not a safe or effective way to treat acne.
Tanning does not improve acne. There are a few reasons why it may seem that tanning can improve acne, but these are temporary. First, tanning dries out the skin which may make it appear less oily. Second, because tanning darkens the skin adjacent to pimples, the redness from the pimples does not seem as apparent. Last, sunlight may target porphyrins in your pores and eliminate the acne-causing bacteria, cutibacterium acnes.
However, all of these effects from tanning are temporary and studies show that sunlight can actually make acne worse by increasing oil production, inflammation, and post-inflammatory hyperpigmentation.
Tanning also increases the risk of sunburns and skin cancer. There are effective topical medications to treat acne that are readily accessible over-the-counter. Instead of exposing yourself to harmful UV radiation, opt for one of these treatment options instead.