Well it could be a loose or broken wire (had one break on my pwr window switch...window went down not up on pass side only) could also be a switch is just old and not making good electrical contact...the switches can be taken out, and the back taken off to check. Could also be that the solenoid is worn out or is jammed because linkage is not moving freely or it is not making good electrical contact. Does it seem like the solenoid wants to pop up when you push the switch, and does it do it on both doors?
Do a quick test. Get a voltmeter and check for voltage at the relay. The blue wire is for "Lock". The black wire is for "Unlock". If you have 12V at the blue wire when you activate the "Lock" button then the relay is probably bad.