How to automatically tag file by name or extension
Apple offer Folder Actions to attach AppleScripts to folders. You can attach an AppleScript to perform any task with incoming files to a specific folder.

See Folder Actions Tutorial: Automation, Meet the Filesystem for a tutorial and step-by-step guide.