In my opinion, fixing rather than repurchasing is part of sustainability. Of course others believe otherwise, and that's okay.
It depends upon the type of lamp, e.g., touch-to-light, mechanical switch, other.
My guess is there is a problem with the lamp socket. The first thing I'd do is use my trusty voltage detector (VD) to verify there was voltage in the socket. Make sure you try the VD with the switch in every position.
Silly test: verify the outlet is hot (the VD's tip fits in the socket for that very reason), then verify the VD registers voltage where lamp's cord enters the lamp's body.
If there was voltage, then I'd check the contacts to verify they're not bent/etc so they are making good contact with the bulb (DO NOT TOUCH THE CONTACTS IF THE LAMP IS PLUGGED IN). They can be bent back to where they should be with a small screwdriver/pencil.
The VD should point you to the problem: outlet, cord, socket, switch. All of these parts can be found in your local hardware store. Make sure you ask for help when you are there. If you pull the "real guys (or gals) don't ask for directions" card, you can seriously injure or kill someone (or yourself!) by using a part that is not designed for what you are trying to do.
When in doubt, get an electrician's help. Even if you have to fork out $500, that's far cheaper than replacing a burned-down house or an injured loved one.