It’s never said explicitly in the books what the harmful aspect of the sun’s rays really are. Here have a gif of Claudia tiptoeing around the light bc of reasons.

Clearly, movie!Claudia can handle the bounced light from the floor.
As you do correctly point out, Ricean vampires can handle light sources at night, so it would appear that the UV rays are what differentiate sunlight from candle/electric/etc., so the UV rays could be the issue. I think there are other elements in sunlight that may be different, but I’m not a scientist, so I wouldn’t know specifics.
Whatever the elements in sunlight that are harmful to them, I think it’s because their vampiric parasite is always at work “perfecting” them, converting their organic cells to inorganic (well, preternatural) cells, all the time. Fresh infusions of blood fuel this process. The issue with direct sunlight is that it intensifies this process to the point that their host bodies can’t handle it, it’s painful, they have to get out of the light.
It’s an intriguing thought, whether a room treated with UV windows would be enough to protect the vampires! If I were a vampire, I probably wouldn’t feel wholly safe with the windows open, as the sun crept in… and Ricean vampires will naturally find shelter if any light touches them during the Death Sleep. So I think they would find themselves cocooned in blankets, or completely concealed under the bed, when they awoke in such a room.
[Previously, re: sunscreen for vampires.]
Slight spoiler under the cut.
The vampiric spirit of Amel, invisible to the human eye, was present more at night, possibly because his very substance couldn’t handle direct sunlight for similar reasons.