you can jack up each wheel grab the top of it he tire, then push and pull the tire, if it moves that hub is bad, the abs sensor is in the hub.
take the plug off each hub, and work it on and off a few times, then dab some di electrical grease on the plug ends, then work them on and off a few more times.
if you cant find a loose hub and greasing dont fix it, the next time the abs light comes on drive to a shop and have it scanned, not a parts store, but a garage, they will charge you most likely but its better then tossing money at parts guessing. hubs are over 100 bucks each.