If something happens in a SPECIFIC MOMENT in the past, you use "preterito indefinido":
"Monday, as I received your letters, I got very happy": "El lunes, cuando RECIBÍ tus cartas, me PUSE muy contento".
If something happens in the past MORE OR LESS REGULARLY, you use "preterito imperfecto":
"In the past, I was very happy whenever I received a letter from you": "En el pasado, ERA muy feliz siempre que RECIBÍA una carta tuya".
There are other cases in which you must use "preterito imperfecto", as for example, when you describe an action that is being performed in the past but not yet finished:
"La niña COMÍA mientras su hermano la MIRABA" (we are describing these actions in the past in the process of being performed).