Try the following steps if your whammy bar does not work.
First, try calibrating the whammy bar. Go to "Options" at the main menu. Go to "Guitar", then to "Calibrate Whammy". Use your whammy bar a few times. If the drawing does not show a complete skeleton of the man pointing down at the woman, leave your whammy bar at its resting place (when not in use) then press Green. Use your whammy bar again. If it shows a complete picture, you are done. If it does not show a complete picture, proceed with the next method.
If the above resolution does not work, go to the "Home" menu. Go to "Wii Remote Settings". Then, go to "Reconnect". Press 1 + 2. Do not touch the whammy bar while doing this/ Your Wiimote should be reconnected and your whammy bar should work.