All the expressions presented here are quite general across the Spanish-speaking world, but remember that there are many others and that uses may vary even between regions of the same country.
Buenos días, buenas tardes and buenas noches are related to the time of the day (morning, afternoon and evening/night) and the formality of the situation. Both factors vary a lot from country to country.