I would try disconnecting/checking-bending/reconnecting the wire harness for the offending tail light. Then pull the bulb/s; inspect and move them side to side in case the problem is a socket/bulb. Sounds like a loose bulb, loose wire, possible intermittent loss of ground/+12v in the wiring...