Excellent question! To be honest, most of the time we greet each other in America we either say 'Good morning' or just plain old 'Hello.' Or 'hey' is fine as well.
'Good afternoon' and 'good evening' are both very formal, you wouldn't really use them with friends or family. If you're working in customer service and speaking to a customer, however, you could use them to sound polite. You would most likely say, 'Hello ma'am/sir, how may I help you this afternoon/evening?' or some variant of that.
If you have any further questions about this, feel free to ask.