You must always use the Present perfect when the time of an action is not important or not specified.
You must always use the Simple past when details about the time or place that an action occured are given or requested.
|Present perfect||Simple past|
|I have lived in Lyon.||I lived in Lyon in 1989.|
|They have eaten Thai food.||They ate Thai food last night.|
|Have you seen 'Othello'?.||Where did you see 'Othello'?|
|We have been to Ireland.||When did you go to Ireland?|
There is also a difference in attitude between the two tenses, which is often an important factor in choosing which tense to use.
- "What did you do at school today?" I use the simple past tense because the question is about activities, and the school day is considered finished.
- "What have you done at school today?" I use the present perfect because the question is about results : « show me ». The time at which the question is asked is considered as a continuation of the school day.