These are formal ways of saying “hello”, which change depending on the time of day. Keep in mind that “good night” is only used to say “good bye”, so if you meet someone late in the day, remember to greet them with “good evening”, rather than “good night”. Good morning can be made more casual by simply saying “morning”. You can also use “afternoon” or “evening” as informal greetings, but these are less commonly used.