This is something that you will get the hang of the more you use the past tense in spoken and written French. But there are some basic rules that you can use to help you. The passé composé is used to describe a completed action - something that happened once and was finished - for example, you would use it to say"yesterday I ate an apple". The imperfect is used for descriptions, like the weather, peoples' emotions and continuous or repeated actions that happened in the past. For example if you are describing something that you used to do every year, or a habit then you would use the imperfect.
Shall we try some examples?
If you wanted to say that you went to France last summer, which tense would you use? First, think about what kind of action you are talking about - is it completed, a habit, are you desbribing someone or something?
What about if you wanted to say that you used to watch television a lot when you were younger? Again, think about what kind of action you are describing - is it a single, completed action or is it a habit ?