The toothpaste acts as a mild abrasive on plastic.
It's when moisture builds up on the inside of your light. Usually caused by a bad seal.
He is not talking about the moisture buildup on the inside of headlights. He is talking about how the outside of the headlight gets dirty and dull. Instead of using plastic polish, you can use toothpaste.