Here are the most common reasons for this to happen:
Most often the issue is the most obvious. Garage door remotes and exterior keypads are all battery powered. After several years of use they will fail and need replacement just like any other household battery powered device. Most remotes require a 12v or 3v battery, while keypads most often require a 9v battery(Exception: New Genie Keypads require two AAA batteries).
Defective or Broken Garage Door Accessories
Garage door remotes and keypads are not designed to last forever. They are plastic cases with small interior electronics. They are subject to wear and tear (a few drops, impacts, exposure to water and they are done for). We stock garage door opener remotes for the following manufacturers.
Liftmaster and Chamberlain Garage Door Remotes and Keypads
Genie Garage Door Remotes and Keypads
Marantec Garage Door Remotes and Keypads
Broken or Failing Logic Board/ Receiver
All garage door remotes and other accessories communicate with the garage door opener though the internal computer called a logic board. The logic board and its receiver can fail. If you look at your opener on all makes and models there is an antennae coming through the bottom. Sometimes the board is defective and needs replacement. Other times it is an interference issue. If you have other wireless technology in your garage that operates on the same frequency as the opener it can cause poor range. Some LED bulbs can also cause this problem.