Most of us have had to deal with a broken light bulb at some time, or we will. It is always a challenge, but here are some tricks that can make removing the base easier.
First, make certain that the power to the fixture is off. If the problem is in a plug-connected lamp, unplug it. If it's a hard-wired fixture, turn the switch off and put a piece of tape over it or, best of all, turn the breaker off or remove the fuse for that circuit and close the cover of the breaker or fuse cabinet. Once the glass globe of an incandescent light bulb has broken, the filament is exposed. The bulb emits light when current passes through that filament. If the circuit is closed, you are going to have that current on the part you need to work with to get the base out. That's a very dangerous situation, so make sure it's off. Check it with a circuit tester to be certain.
Second, get a wastebasket or a strong trash bag and put all the broken glass in it. If there are some shards still attached to the base, either leave them or wearing gloves and eye protection, carefully snap them off use to enable you to turn the base of the light bulb out of the socket, once it is ready - using a broken bulb extractor, a pair of pliers, or a potato.
Broken Bulb Extractor
Broken bulb extractors are available for less than $10 at most hardware and home improvement stores. These tools have a rubber tip to engage the base of the broken bulb and a plastic body with a threaded socket on the back end that allows them to be screwed onto an extension pole - handy for hard-to-reach bulbs. Use it as it comes out of the package. You push it firmly over the filament support and into the base, and use it to turn the base out of the socket.
You can also use pliers to turn the base out of the socket. If the base is attached to the socket, use a pair of needle-nose pliers to grip the metal edge of the base and start turning counter-clockwise. The base may split and start to curl up around your pliers like the top of a sardine can; that's okay. If the piece you are turning breaks off before the base turns, drop it in the trash and start on a new piece of the base. Eventually, the base will come out, either by turning or by being removed in pieces. It doesn't matter, provided you were careful not to damage the socket.
If you don't have either a set of pliers or a broken bulb extractor on hand, but you do have a medium-sized uncooked potato, you can make an effective bulb extractor. Carve one end of the potato into a cylinder small enough to fit inside the base but engage it - about 3/4" in diameter. Taper the tip of that cylinder and make a hole in the center of it to fit over the glass filament support. Hold the potato by the unpeeled end and, as with the broken bulb extractor, push it firmly over the filament support and into the base. Then use it to turn the base out of the socket.
Install the new bulb, making sure your hands are clean first. Avoid over-tightening it -- you don't want to have to go through this same process the next time. Turn the power back on.