I wouldn't say that you got to have one, but they are nice to have. They help keep the tank free of free floating algae and bacteria. I had problems with ick prior to getting mine. It's been about five months since I installed my UV sterilizer, no sign of any ick or any other problems with the fish, and the water is crystal clear.
IMO, uv sterilizers are good for very specific problems... Otherwise they're of limited value.
Many of the units out there only have enough UV exposure to kill green water algae. If you have this specific algae, most UV sterilizers will do a good job against it.
UV sterilization has little if any affect on algae that is growing on the surface of your glass, plants, substrate etc. Yeah, you might kill a few spores with a sufficiently powerful unit, but spores are generally pretty tough. Certainly a high-flow unit designed for killing green water algae won't kill spores.
If you size them correctly, UV sterilizers are also good against protozoans and bacteria in the water. But you really need to size them correctly for this, and very few do. Certainly most if not all of the inexpensive units with a built-in pump have way to much flow to work this way. Also, this still has no affect on bacteria in your fish. It's more a preventative measure..