I sometimes offer a "hi" or "good morning" or something - that can often be misinterpreted (I was chewed out by a lady once for saying something nice to her - as she didn't hear me properly and assumed I'd chastised her - I straightened that out and all was well
).
More often than not I'll just look over and nod, and when passing I'll offer a hand of 'thanks' if they seem to have taken action to move over for me or whatever.
I try and bring a sense of comeraderie to my riding, but there's grumpy/antisocial people on bikes as well as in cars.