If properly operated then U/V sterilisers will kill 99.9% of all things that pass through the U/V light. This includes bacteria, fungus, protozoans, plankton, etc. As mentioned by Crazy fishes, most beneficial bacteria is attached to rocks or filter media and does not go through the U/V unit. This leaves you with bad bacteria, algae, zooplankton, and parasites like whitespot that can be killed off by the unit. However, if you keep the tank well maintained through regular water changes, filter maintenance, etc, then you shouldn't have many problems with this anyway. Quarantining fish before they are added to an established tank will do a lot more to prevent disease outbreaks compared to a U/V steriliser.
Many people have a U/V unit and run it for a few hours a day/ week. Other people only use them when there is a disease outbreak. Personally I don't use them on individual home tanks because they don't have anything new added to them. They do get used in shops, which have a lot of new fish coming into the tanks all the time. This is where U/V sterilisers are good. They help limit diseases in tanks which get lots of new fish (and potentially diseases) on a regular basis.
If you have a clean healthy tank then it should not need a U/V unit and if you quarantine new stock before adding it to the display tank, there should be no new diseases brought into the tank.