The water pump draws a substantial current when running, which can temporarily drop the voltage when on battery - especially if the battery charge is low. The output of incandescent light bulbs are quite sensitive to changes in voltage. LED lights are less sensitive to voltage, but simply stop lighting at all if voltage drops below minimum.
If on shore power, the cause of the flickering when the water pump cycles would be marginal wiring - especially likely if the lights are on the same circuit as the pump. The extra current draw of the pump causes a voltage drop in the wiring if the wires aren't as big as they should be.
Ideally, the pump should be on a separate circuit/fuse, and have at least 14 gauge wire.
The above assumes separate return/ground (negative) wires. If the chassis is used for ground, then putting in bigger wires/better connections/separate circuits isn't going to help much. But you can make sure the ground connections are clean metal-to-metal.
Last possibility - that I discovered on my A-frame - is that the wire connections are incredibly crappy. I found the crimped wire nuts had maybe one strand of the two wires actually touching inside the nut. When I found out how poorly the wire nuts were put on, I was astounded anything worked. A winter project one of these days is to completely rewire and label the factory-made rat's nest behind my converter/load center.
2014 Rockwood A122 A-frame