Two distinct uses. (1) As a connector mid-sentence: 'right then; as luck would have it' — often introducing something fortunate or coincidentally well-timed. (2) In greetings, especially in writing or older / regional speech:
你可好 = 'are you well?' Replace it in modern casual speech with
你好吗 or
最近怎么样.