Apple's IR Remote may stop working for a number of reasons, either because the device itself is not functioning correctly or because the computer cannot pair with the device. There are several troubleshooting steps to take when testing the Apple remote, to isolate problems and hopefully get the remote up and running again.
Test with a digital camera
If the remote is working as it should, it should output an infrared signal when you press a button. You cannot see this with your eye, but most digital camera sensors should be able to pick this up. Therefore, point the device to a camera (your Mac's webcam will do), and press a button with the camera viewer open. If you do not see a dim flashing light in the camera viewer then you may need to replace the battery, which is described here: http://support.apple.com/kb/HT1306
Re-pair your remote
If the remote is working, you may need to re-pair the remote with your system, be it the computer or another device such as an Apple TV. To pair with each device, see the following Apple KB articles:
Keep in mind that you can only pair the device with one system at a time, though if your device is unpaired you should still be able to control it with any remote. I suggest you try this, since problems with the pairing process (or recognition of paired devices) may be a cause for perfectly functional remotes not working.
In the "Security" system preferences, you cannot pair the remote unless the option to disable the IR receiver is unchecked, so be sure this is set appropriately before trying to pair the remote. When unchecked and the remote is still not working, click the "Pair..." button and follow the instructions to pair your remote with the computer.
Remote cannot pair
After performing an OS upgrade or system restore from Time Machine, some people have found their remotes cannot pair. Usually these For these users, the system preferences may not have options for disabling or enabling the remote control. If this is the case, you can try the following suggestions to see if the option to pair with a remote returns.
Reset the PRAM and SMC
If the system is not recognizing the IR Receiver it may not show any options to pair with a remote. Check the "USB" section of the System Profiler to see if "IR Receiver" is listed, and if not then perform the PRAM and SMC resets.
Boot into Safe Mode
If the system is having troubles loading the IR Receiver drivers, booting to Safe mode and then back to normal mode may clear boot cache problems.
Toggle Firewall settings
Some people have found that changing the Firewall settings seems to fix the problem.
Remove the System Preferences preferences
If the system preferences settings are corrupt, removing the preference file for it may help. Try removing the file "com.apple.SystemPreferences.plist" from the /username/Library/Preferences/ folder and relaunching the system preferences.