When to use AC line filter
An AC power line filter will provide filtering in two ways for a line powered device. The effectiveness of the filtering will of depend to some degree on the nature of the product enclosure and shields.

Case 1: Line transient noise entering product enclosure.

The AC line filter can help to keep external transients and spikes on the power line from entering the product enclosure. This type of interference can be caused by other AC powered devices being turned on and off and by motors running on the the same power subsystem. The series inductance and capacitance line-to-line and line-to-neutral that is built into the AC line filter can attenuate the transients so that they do not upset sensitive circuitry inside the enclosure. Of course there is a selection process to determine what particular filter device would provide the correct isolation for a given range of transient spike voltages and frequencies.

Case 2: High frequency RF noise conducted out of product over power line wires.

The AC power lines entering a product enclosure can act both as an antenna and as a low impedance conduction path for high frequency signals that exist inside the product. These signals may couple into the AC power line wires either inductively or capacitivly from circuitry on PC boards, other internal wiring or off other components such as transformers, coils or adjacently routed wires. To a lesser degree, but still a potential problem, the AC lines can also pickup induced current signals from magnetic fields inside the enclosure. Since there are agency administered rules regarding the frequencies and signal levels that are permitted to exit a product over the power cord it can be an advantage to use an AC power line filter to keep signals inside the enclosure as much as possible and keep the portion that exits down to less than the legal limits for conducted emissions. Once again the AC line filter must be selected with characteristics that are suitable to the nature of the internal signals that need attenuation.