I am not sure because I don't have a real Guitar Hero guitar over here, but I believe that the buttons work similar to any normal keyboard: There is this plastic 'button' wich is visible from the outside, wich, when pressed, will actually press on a rubber...thingy wich will then, when pressed deep enough, connect two contacts together, resulting in electricity flowing->a 'pressed' signal send to the computer. To see where the problem lies:
-Open up the guitar. I believe it can be opened by using a screwdriver, but again, I'm not totally sure.
-Remove the plastic buttons, and clean the dirt that might be underneath. This might already fix the problem.
-Try if the green button works when only pressing the rubber buttons. If this works like this but not with the green plastic button on, it means that the green plastic cap is not making contact well enough with the rubber button. Try to fix this by for instance inserting some tape between the cap and the rubber thing.
-If this doesn't work, the problem is something else, and probably much harder to fix...
EDIT: mocalacace beat me to it, and the tutorial he points at is probably much better.