This one is a Style Lie. Sorry to burst your bubble but prolonged sun exposure is not good for your skin in any way.
This myth stems from the fact that the sun does indeed make us sweat which,which can clean out pores. The sun also dries out the skin which, in turn, dries out pimples. You may see a difference in your face if you've had a day in the sun but it doesn't mean the sun as magically cured your acne. It's only temporary.
If you are suffering from acne try an over the counter medication like Acne Free for 1 – 2 months. If that doesn't work, you'll need to see your doctor, not the tanning bed, for relief. The long term damage a bed or the sun can do for your face is far worse than damage from acne. Make sure you include SPF and a topical acne treatment in your skin care routine. No sun necessary.