First of all, I don't recommend tanning beds. But if you must...wait at least 3-6 months. Your skin will be more sensitive to UV radiation during the first 3-6 months after surgery. UV radiation to the scars should be avoided for 12-18 months, to prevent dark scars.
After any surgery the skin is more sensitive to any trauma including tanning salons. After surgery and complete healing I would wait ayleast 6 months before going to tanning salons