The reason sunlight kills vampires in the Vampire Diaries is specifically due to the fact that a witch cast a spell so that the sun's life aspect causes them to be immortal. Although the wikia does also state that it's the natural UV light that is connected to their weakness.
The reason vampires are naturally weak against the sun, actually
started at the time of the Originals, when the witch Esther used the
sun's life aspect and the White Oak tree's immortality to make her
family live forever and be able to protect themselves. Sunlight is
harmful but not fatal to Originals, however, Esther created the very
first daylight rings.
The quote about the UV :
Slater's cafe and home contained tempered glass windows to block UV
rays, making them safe environments for vampires. This shows the
harmful element is natural UV light, but it is unclear if artificial
UV light would have the same effect. Furthermore, it's unclear if the
lapis lazuli rings protect against only natural sunlight or UV rays in
It's not stated anywhere which wavelength of UV light actually affects the vampires in that universe, just that the "natural UV light" is the harmful element.