Assuming you have the Folder with the Files you want to tag open in the Finder, a simple method to get the enclosing Folder name is to use the open Finder Window Name (which will be the same as the Folder name).
The Keyboard Maestro Token%WindowName%1% is the name of the front open Window and is used as the Tag name in the last Action of the Macro.
Like I said, this Example requires you to have the Folder open and displayed as the frontmost window, for it to work. If you wanted to do it the other way around (i.e. select the closed Folder in the Finder and Tag the files inside that closed Folder) that would still be possible but would mean getting the Folder name a different way.
EDIT: After uploading the first version of this Macro I realised that as it "selects all" if you were actually not in the Folder you thought you were in, you could accidentally Tag a lot of files and folders with the wrong Tag... So, I added in an Alert Action just so you can preview what the Tag will be before going ahead or cancelling.
As chance would have it I already had a macro that removed all the tags in the files in selected folders, so I've modified it as follows:
Select the folders you want processed in Finder (it doesn't matter if you select files by accident as the macro will only process folders). Trigger the macro and then, for each folder that you've selected the macro will display the tag that will be applied to each file in that folder and give you the opportunity to change it if you wish.
As usual for any macro given to you by someone you should test it on files that are copies/unimportant to ensure it does as you wish. I have tested it myself and it seems to be ok.
The macro has been uploaded in a disabled state and you'll need to set up a hot key trigger that suits you.