Yes, light pollution filters for cameras work by reducing the effects of light pollution when taking astrophotographs. Before you choose a light pollution filter it's worth bearing in mind that they are most effective when used with astro-modified cameras, meaning cameras that are specifically designed to shoot astrophotography. This is because these cameras are made to be more sensitive to hydrogen-alpha wavelengths.