Because one of my fish got sick with a serious internal mystery illness, I have have put a UV sterilizer on my wishlish. I currently have no way to prevent others in the same tank from coming down with the same mystery illness as there is no known cause or diagnoses. Might even pay for itself in gas money because treating sick fish who don't live with you requires a lot of driving.
I wouldn't count on it alone to prevent diseases, just as another tool to help prevent diseases. I've seen that many experienced aquarists use them.
I have gotten the idea that you need to research it first and get the proper size and have enough water flow for it to be effective.
I have been warned that in some cases, they can kill beneficial bacteria, aside from the cost this seems like the only potential drawback.
Keep in mind, last time I asked about using a UV sterilizer here, the response was quite negative. Some people think they will not kill microorganisms, prevent diseases and are ineffective.