How to change tap to click using "defaults write" from command line?
Got it to work. The correct format (for me) is: 

defaults -currentHost write -globalDomain com.apple.mouse.tapBehavior -int 0


Change 0 to 1 if you want to enable the tap-to-click. This seems to be really sensitive to which version you are using. The commands in the question have worked for others.

Logout - login is required for this to work.