If you've ever had a light bulb break off in a socket and didn't know how to get it out, this might just be the answer. Aside from the bulb breaking being a frustrating event, you lose light and there is a real danger of getting electrocuted if you reach in to grab it without first turning off the power to the light fixture.
I've found that there are a few methods that work quite nicely to remove the inner base of the broken bulb from the socket.
First, you can use a bar of soap and shove it down over the exposed inner glass. Slowly twist the soap in a counterclockwise motion and with any luck, the bulb with come out of the socket. Discard the soap after removing the bulb.
The other method is to use a potato to accomplish the same result. It too must be turned counterclockwise. Again, throw the potato away after using it for this removal.
The final method has been a personal favorite of mine. Just simply use a pair of long-nosed pliers and gently squeeze one side of the pliers between the light bulb side and the side of the socket, being careful not to damage the socket base. Now, squeeze the pliers and twist them slightly as you would a Spam can opener. Then, gently turn the whole light bulb socket in a counterclockwise motion until it loosens out of the light socket.
CFL light bulbs are a different story. They contain mercury and should be handled with care and disposed of properly.
Always wear protective gloves and don't get any on your skin! Be cautious of broken glass. Try wiggling the bulb back and forth lightly to free it from the socket. Check the inside of the light socket for damage before installing a new bulb in the socket.