To put it bluntly, it destroys DNA by breaking the bonds that hold it together. That statement is true no matter how complex you get with explaining it. It doesn’t melt the DNA and turn a single cell organism into a blob of goo. It simply cripples the organism’s ability to function. It’s much like breaking a bone in your leg, it doesn’t ruin everything in it, just stops it operating as it’s meant to. Now seeing as the life of bacteria can be measured in minutes, it very rarely gets into a position where it’s able to repair the damage before it dies. What this means in real terms is that the bacteria’s ability to reproduce is halted (When 1 splits and turns into 2). Without this ability the bacteria is effectively neutralised and is considered safe.
This effect is uniform on all DNA, a plant will react in exactly the same way as an animal and even a human. The mitigating factor is that light has no penetrating features, so for example, when you get sunburn it will only be on the top layer of skin (mostly). This means that if the bacteria are sufficiently shielded against the light then it will have no impact on it. This shielding will usually be other organic and non-organic matter as we come across it but sometimes we see organisms with very UV resistant cell walls.
These protein heavy walls are broken down with higher intensity UV. So where you may have a larger amount of UV being generated to deal with this situation, you won’t need an alternative treatment method. You’ll know this is an absolute blessing if you’ve ever been in an environment where this is not possible (mentioning no Chlorine based treatments).