Using Mighty Mouse (requires 10.4.2), you can set any of the actions to open a file, script, application, etc. So I set about making the squeeze action hide the frontmost application.

The AppleScript for this is fairly simple (though, like any AppleScript, I needed to start from similar code online).

tell application "System Events"
set app_name to name of the second process whose frontmost is true
set visible of process app_name to false
end tell

(In case you're curious, the reason why I use the second process is because that when the script is running, the first process is the script itself.)

Save the script as an 'application bundle' in ~/Library > Scripts. Open the application bundle that was created and open the Info.plist file in Property List Editor (Developer Tools required). Add an element LSUIElement with a string value of 1. This means that when we run the script, it won't pop up in the Dock.

Now open System Preferences > Keyboard & Mouse > Mouse, and set the squeeze action to Other... and navigate to the application bundle you just created.

USB Overdrive works wonders with Mighty Mouse, allowing you to set an incredible variety of settings to the buttons, including keyboard shortcuts. There's a hint about it here somewhere I believe. Just make sure you remove the AppleHIDMouse.kext file from the Extensions folder. In fact, after upgrading to 10.4.4 I had to re-do this procedure.