garage door button on the wall does not work but remote control does open and close garage door
There are a few possibilities, you can eliminate them one by one:

Take proper safety precautions to ensure that you are not injured if the door operates while you perform the following tests


The wiring is loose at the opener.  Depending on your opener, you may have screw terminals or push in connectors.  Check that the wires are secure by gently tugging on them.  (Note that most openers will have two sets of wires -- one going to the button, and another to the photocell safety mechanism.   If the unit operates correctly with the remote, the ones going to the photocell are probably OK).
Bad wiring or button.  If you have screw connectors, touch a screwdriver to the two screws that the button connects to.   If you have push-in connectors, remove the wires (they may be color-coded, keep track of which is which) and briefly connect a wire to the two terminals.  If the door operates, the problem is in the wire or button.
The button is bad.   Disconnect the wires from the button and touch the bare ends together.   If the door operates, either the wires weren't securely connected to the button, or it's gone bad.   If the button is bad, you can replace with a like replacement, or a simple doorbell button (although you will lose the ability to control the light or turn on security mode if your button offers those features). 


If you've eliminated the above, the control board in the opener may have gone bad, possibly as a result of a voltage surge.   On some models, replacement boards are available online and are easy to replace.  Search online for the model number of your unit for leads.