Classic symptoms of a poor earth.
(1) Check all lamps (esp the rear) for moisture penetration - clean and dry out if necessary
(2) Check connectors for correct seating
(3) Check the din connectors for corrosion and treat with WD40 and clean if necessary.
(4) Check the bulb seating in the rear lamp for corrosion.
(5) Check the bulbs (esp the brake bulbs) for correct type and seating - Changing all three (inc high level) may solve the problem.
[