used when you are saying goodbye to someone late in the evening, or when they or you are going to bed; in informal use people often just say Night.
Check pronunciation: good night
Definition of good night exclamation from the Oxford Advanced American Dictionary