Does cleaning LEGO parts affect their value?
Cleaning coins reduces their value because being metal they form a natural patina with age. The patina is an indication of the coin's age, and supports its authenticity. Removing any of the patina through cleaning reduces the value because it removes this sign of its authenticity. 

Cleaning LEGO pieces does not affect their value in the same way it does coins. It is generally accepted that used pieces will have some small scratches and will have lost some of the shine of new pieces. Unless the scratches are deep enough to be seen easily or the piece is damaged, these incidental small scratches have little effect on the value of used pieces or sets.

LEGO pieces do not scratch one another, although they may cause scuffs (which can be removed). Scratches are caused by substances that are harder than the ABS plastic LEGO pieces are made from. This is usually dirt and dust that contain small particles of grit. This can settle on the pieces and scratch them as they are handled. Many pieces are played with on the floor, where they pick up grit and can be rubbed into carpet or flooring that contains abrasive particles.

Cleaning them can remove this abrasive grit and reduce further scratching, but aggressive rubbing can cause more scratching. When I clean pieces, I like to let them soak in warm water and mild soap for several hours - overnight usually - with no scrubbing and just a gentle mixing around of the pieces. Then I drain the water and rinse them until there are no soap suds and spread them out in a single layer on a clean towel to air dry. This will get all but the most dirty pieces clean.

For pieces that are very dusty, I will soak them then run them under a tap and use the water pressure to clean off as much dust as possible. 

For pieces with dried-on dirt or other substances, you need to scrape it off with something softer than the plastic, like a fingernail, or try using the thin edge of a brick separator which is the same type of plastic.