There are many methods, and it depends on how bad the lenses are. Haze can be eliminated with polishing compound or plastic polisher, deeper scratches require wet sanding, and UV light yellowing can never be fully eliminated - the yellowing occurs throughout the plastic.
I've never heard of anyone using toothpaste, but it sounds like it would work.