Unlike English, especially American English, the Italian language is still strictly divided into formal and informal codes which determine how you address a certain person, which will range from how you translate the word ‘you‘ (more of that later) to how you greet them.
Italian has a wide range of greetings words and we need to tread carefully.
Ciao is perhaps the most familiar although definitely the informal register of course. Use it both for when you arrive or see someone, or as you take your leave (so both ‘hello’ and ‘bye’). Use it with friends, family, children or perhaps even people of your own age (although we’re into a grey area there) and generally people who you address with the ‘tu‘ form.
Buongiorno on the other hand is genrally formal and consequently use it with people you don’t know, superiors, people who are older than you etc., both in greeting and departing.
That isn’t to say you can’t use Buongiorno with friends or family of course, instead of ‘ciao’ just as you would choose ‘Hi’ or Good morning’ in English.
Buona Sera (good afternoon, good evening) on the other hand is rarely used in the informal context, although times generally vary about when to start using it during the day. As a rule of thumb I would say ‘after lunch’!
Buon pomeriggio also seems to have crept in of late: literally ‘good afternoon‘ although more in the sense of ‘have a good afternoon‘ rather than a greeting in the English way.
If in doubt you might go for the ‘neutral’ “Salve!” which will get you out of the formal/informal dilemma although is often frowned upon by some who would prefer the formal greeting (but I doubt they would ever tell you that). This word is generally used only in the arrival greeting sense, so when taking your leave use ‘arrivederci‘ which is just about good in any context
Buona notte is of course strictly ‘good night‘ as we would use it in English.
Pronto! is the word for ‘hello‘ when answering the phone usually followed by the appropriate greeting.
Buona Giornata and Buona Serata, ‘have a good day / have a good evening’ respectively are quite common and can generally be used as we would in English, and although not strictly greetings, are often used when taking leave.
More “wishing someone something” language later!