Tail lights not working properly

I would start with the sockets, pigtails, grounding at the sockets, and bulbs. And don't forget the springs in the pigtails. Also check the tail harness connector, normally in the left kick panel for tightness and corrosion

Don't be afraid to solder a ground pigtail to the socket shell and bolt to the body