I've been having the same issue but with my left side tail light. I brought it over to the mechanic for an inspection hoping they find the problem but they didn't find anything. At first they said that they've found a rotten wire in the trunk, but that wasn't the case.
When I finally picked up my car, the mechanic passed my car and told me that they couldn't make the tail light not work again so they could fine the issue. I've asked them for the wire schematics and looks like the wire goes from the front of the car to the fuse box to the signal switch then splits to the tail lights.
I've took the car home and find out that the light wasn't working again. I've then decided to shake the signal light switch and then the tail light worked. Ever since I've changed the signal switch the tail light have been working.
You could get a new signal switch in ebay for about $35.00 don't waste your time at the junk yard... Also, youtube how to change the signal light switch and look for the one that says 1996 Ford Ranger... it's pretty much the same deal with our cars...
Hope this helps.