If the ABS / ESP light is staying on then this would indicate a fault with the system which shouldn't effect the regular braking performance so the car is still safe to drive.
The quickest route to repair is to have the car plugged into a diagnostic machine which will read off the fault code stored in the ECU (providing the light is still on at this point) and indicate which sensor has failed or whether the fault is more serious.
However with these systems 99% of the time its a problem with one of the wheel speed sensors and I'd first check the connections at all four corners first for any signs of corrosion or chafed wiring.
The sensor is located in the wheel hub so you'll have to remove each wheel in turn to inspect them all.
Also check that the toothed wheel that the sensor points to is clean and free of any debris.
you can check each sensor's function by plugging the two output wires into an AC voltmeter and spinning the wheel quite quickly, you should get a voltage signal that increases with rev's.
Its possible that the fault is only a bad connection to one of the wheel sensors.
This may be remedied by removing each wheel in turn and unplugging each sensor and cleaning the contacts with a squirt of electrical contact cleaner. Then refitting.