9 times out of 10 I try my best to make eye contact. If someone else locks gaze, then I either smile, nod my head or say hello in response.
There are always exceptions though. In some places, people might feel disrespected if they feel like you're staring at them. I guess you just have to be aware of the situation.