It's an old fashioned greeting, but people use it nowadays as a way of affecting humour, friendliness or cheerfulness. It's the sort of thing a school teacher might say to a particularly surly...