If they're flickering when you move the sockets, that indicates a loose or broken wire generally. The only way to be sure is to take the entire housing down (easy enough, two philips screws hold it up there, under the center dome cover). One wire from the socket goes to the switch, the other to a splice between the two that goes to the hot lead of the 3-pin connector. Another possibility is the contacts to the lights themselves have become corroded, or they've relaxed their spring tension somewhat, easy fix for that would be to remove the bulb housings and bend the contacts of the sockets down into the socket to make better contact with the bulb housings when you put them back in. Of course, don't over bend them lol.
Last possibility should not affect moving the sockets, but you could have corroded switch contacts as well. I want to say those switches CAN be taken apart without destroying them, but I don't have a set with me to be certain.