There are quite a few good UV threads here lately...
But in conclusion to the question here...
A UV light will (potentiall) kill any living organism (including bacteria) that passes through it...
"Beneficial Bacteria" (AOBs & NOBs) that we rely on 'grow on surfaces' as opposed to being free floating.
During the early stages of establishing an aquarium I would discourage the use of a UV light. This is to allow bacteria to form (on surfaces), become dislodged and take hold elsewhere in the tank. Once a tank is 'mature' meaning bacteria is established throughout the system, then a UV light holds no threat to distubring the bacterial balance in the tank.