This KnowledgeBase article explains how to prevent OS X from creating new .DS_Store files when opening folders on remote volumes mounted using SMB/CIFS, AFP, NFS, and WebDAV. The creation of .DS_Store files (and more so, ._AppleDouble files which are not covered in this hint) is frequently the source of complaints against Mac users, who often leave a trail of these files scattered throughout the filesystem when "visiting" a Windows computer. Even with this hint in place, the .DS_Store files will continue to be created on local volumes (which is a good thing).
To prevent the creation of these files, open the Terminal and type:
It may be necessary to log out and back in, or even to restart the computer (which is what the article states), for the change to take effect.
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Mac OS X Hints