Both will work well to deliver safe water but a UV light will not do anything to filter the water. A UV system has a flow rate and if you exceed this flow rate, the water may not be purified so be usre to buy a high flow rate system. Also, very important but usually overlooked, the water must be fairly soft going into it or it will not perform well. The rating will be in the install book but they usually require that water is first softened to 2 grains, or about 17 ppm or less before running through the filter.
UV sort of maims, or injures germs and bacteria in a similar way as chlorine so they do not grow. R/O will remove the dead bodies. If I could only have one, it would be R/O. Most households will use less than a gallong of drinking water a day, the only water that needs to be treated. If your water really needs to be treated, I would recommend using both systems, along with a good water softener.
I have them all in my house, along with an acid nuetralizer. R/O water is just too cool not to have and can be used very effectively for a variety of cleaning applications, not just drinking. It is the only thing I use to clean my entire airplane and it dries spot free. Also remember if you get a UV system, the bulb is only good for usually one year. If you don't replace it, don't kid yourself that it is still killing germs just because it hasn't burned out.