Here you can find how to fix this problem. Note: Before jumping on any of the solutions below, make sure you check your mouse batteries status. If they are low with power, they may need to be replaced.
Method #1: Delete Bluetooth.plist
In most cases, the cause of the right mouse not working are invalid Bluetooth.plist files. Here is how to fix that. Booting up the OS will recreate the file you’ve just deleted (or moved), and your Magic Mouse secondary click should work properly.
Method #2: Update OS X or macOS
Updating your Mac OS to the most recent version, available for your device may also fix right button not working.
Method #3: Restart Your Mac and Magic Mouse
Additionally, if this doesn’t help, try restarting your Magic Mouse (remove the batteries and put them back in), and toggling your Mac’s Bluetooth off and on again. Another thing that you can try is unpairing the mouse and then pairing it again. It helped for some users. Now, let us know which method worked for you in the comment section below.
How to Fix or Disable Magic Mouse Zooming By Itself RandomlyHow to Fix Magic Jack Error 3002Fix: Middle Mouse Button not WorkingHow to Save Time and Buy the Right Mouse Pad