Buenos días
Thu, Dec 24, 2015
As you know, the greeting buenos días translates as 'good morning', not 'good day'. Note that día is masculine, hence buenos días rather than *buenas días. You'll occasionally hear the singular version buen día as well, especially as a farewell: Que tengas buen/bonito día (said to you as you leave).
If you've just woken up, you may be asked ¿Cómo amaneciste?, which equates to How did you sleep? but actually inquires about how you felt upon waking. Bien, gracias is a fine response.
Buenas tardes
Starting at noon, the greeting becomes buenas tardes. If you don't know the hour, you can say the noncommittal buenas. Or you can correct yourself with: Buenos días, ah no, ya son tardes or Buenas tardes, digo, buenos días. The idea of afternoon may extend to a later hour than you are used to. It's common to hear buenas tardes up until nightfall and even later.
Buenas noches
Buenas noches works for both the greeting good evening and the departure good night. If it's late, you can add Descansa or Que descanses = sleep tight.
Usage
These greeting are used more frequently than their English counterparts, especially in situations where we might simply say Hello or Hi in English: when entering a room, passing by neighborhors, greeting customers, starting an interaction with a clerk, making business calls, etc.
With all three expressions, the usual response is to repeat back the expression itself.