Good morning is used as a greeting and to wish someone that they have a morning that is good.
Good morning is a phrase that is primarily used as a greeting. It is often used as a conversation starter and is viewed as polite conversation. Imagine a scenario where you are just leaving your home to go to work, and you run into your neighbor, now you can’t just ignore her, and making small talk just irritates everyone, so the solution is to just wish her a ‘good morning’ and to be on your merry way.
Many people actually respond to a well meaning good morning with ‘what’s so good about this morning?’ or something similar. However, what they fail to acknowledge is that good morning may mean a variety of things as depending on the situation and on the person who used it.
While, good morning can be used to claim that it is a good morning, it can also be used to say that ‘I hope you have a good morning’. Hence, in reference to the previous scenario, the speaker is not claiming that it is a good morning, he is wishing that you would have a good morning, and while you make not in fact be having a good morning, it is not the speaker’s fault.
Despite this, for most people, wishing someone is just a social norm, a polite way to acknowledge someone and greet someone. It may or may not have an implied meaning, but rather the speaker may have just said it out of habit, one that has been ingrained in him due to norms that dictate social interactions. Hence, it is just polite to wish someone a good morning, and be wished good morning in return.
Also good mornings are often usually used to greet someone, and not when departing. The ideal phrase to be used when departing is not ‘good morning’ but rather, ‘Have a good day,’ or just ‘good day’. Similarly, ‘good morning’ should only be used in mornings, basically this is designated as the time you wake up till noon; after noon, the appropriate greeting is ‘good afternoon’. Likewise, when greeting someone in the evening, ‘good evening’ is used, but never ‘good night’, as that is again used in departure, similar to ‘good day.’