2002 Ford Taurus X - Electric issues

why does my locks go up and down and the interior light comes on when I am driving

That indicates your car has some sort of electrical problem. Common possibilities

  • battery/alternator/grounds
  • body control module (if applicable)
  • wiring insulation degraded (first check, driver door hinge area)
  • connector corrosion

Your vehicle has a failing door ajar switch.

My Corolla has a dash warning light if key in ignition & door is not closed. OP, does your car have that warning light? If so, does it ever turn on for no reason, especially when these other symptoms are occurring?