"Good morning" is a well-known expression used to greet someone politely in the morning. It is used in many ways and circumstances. For example, amongst friends, at work, during meetings, when answering your phone, and so forth. It's a nice way of wishing someone goodness for their morning. It can be used as a greeting and, if changed a bit, for a way of parting: "Have a good morning!" There are other ways of greeting, if course, but this one pertains to your question.