UV-B lamps
UV-B lamps are lamps that emit a spectrum of ultraviolet light with wavelengths ranging from 290–320 nanometers. This spectrum is also commonly called the biological spectrum due to the human body's sensitivity to light of such a wavelength. UV-B light does not tan the skin very much, compared to the UV-A lamps that are used in tanning beds.

Treating skin diseases
The main diseases that are treated with UV-B lamps are psoriasis, lichen planus and atopic dermatitis (eczema)., vitiligo (loss of skin color) and some other skin diseases.

There are thousands of dermatology clinics around the world that treat skin ailments with UV-B lamps. Many people who suffer from psoriasis or other skin diseases have their own UV-B lamp for home treatment. A small lamp is used to treat limited areas of the skin, while full body cabins are available in clinics and hospitals.

Overexposure to UV-B light can burn the skin, so the exposure time must be regulated by a timer that turns off the lamp.

Increasing vitamin D3
When the skin is exposed to UV-B light, cholesterol in the skin is transformed into vitamin D3. In general the skin does not need much  UV-B energy to generate vitamin D3, and 15 minutes of strong sunshine every day is usually considered enough.

In Northern European countries especially in the winter when sunlight is scarce, pregnant women may receive UVB light in clinics to assure that their babies have an adequate amount of vitamin D3 when born.

Animals need UV-B light to produce vitamin D3 and strong bones. 
Zoos have UV-B lamps for reptiles kept indoors. Reptile keepers in a home environment can purchase UV-B/UVA emitting bulbs from pet stores to provide their reptiles with the required amount of UVB/UVA they need to generate vitamin D3. Such lights are branded Creature World or Repti Glo and used for a period of 10–12 hours per day to give the required exposure.
These lamps simulate the sun spectrum and thus produce mostly visible light and a very small amount of UV-B light, like the sun.

Cancer risks
UV-B treatments for treating skin diseases (psoriasis, vitiligo, atopic dermatitis, etc.) are given in a very low dosage. The treatments take only few minutes.

The maximum dose of broadband UV-B is 0.5 Joules per treatment.
The maximum dose for narrowband UV-B is 3 Joules per treatment.  
This low dosage does not increase the risk of skin cancer and 
UV-B phototherapy remains a very safe treatment. Research citing ten year of experience of phototherapy in Yonsei Medical Center has not revealed any cases of malignancy in the skin.

Too much UV ultraviolet radiation of an undesirable wavelength may lead to direct DNA damage, sunburn, and skin cancer. In contrast to exposure to UV-B light given at low dosage, it was found that UV-A light increases the risk of skin cancer because of the problematic wavelength and because it is given in a much higher dosage.