Although still well short of being an expert on this issue, I did some looking at research on PubMed to try to answer the question of whether tanning beds are a safe and reliable source of vitamin D.
A 2004 study found that tanners had much higher levels of vitamin D (and lower rates of vitamin D deficiency) than non-tanning bed users. They noted that to produce vitamin D, the tanning bed must emit ultraviolet B rays of 290–315 nm. This study did not indicate that they screened subjects based on the UV ray type of the tanning bed they used. A link to entire study is below (1).
I found another abstract that stated that most tanning “devices” emit ultraviolet A rays, which do not produce much vitamin D (2).
Finally, a third abstract below (3) suggests what a lot of others do, that tanning beds can cause skin cancer.
My opinion after checking out the research is that you can get vitamin D from tanning beds if you make sure the bed uses UV B rays of 290–315 nm, but you should probably not spend more than 20 minutes in them at a time.
References
1. Tangpricha V, Turner A, Spina C, Decastro S, Chen TC, Holick MF. Tanning is associated with optimal vitamin D status (serum 25-hydroxyvitamin D concentration) and higher bone mineral density. Am J Clin Nutr. 2004 Dec;80(6):1645-9.
2. Woo DK, Eide MJ. Tanning beds, skin cancer, and vitamin D: An examination of the scientific evidence and public health implications. Dermatol Ther. 2010 Jan;23(1):61-71. (Abstract)
3. Schulman JM, Fisher DE. Indoor ultraviolet tanning and skin cancer: health risks and opportunities. Curr Opin Oncol. 2009 Mar;21(2):144-9.