I lived (and past simple in general) is used when:
- the time of the action in the past is give (last Monday, a year ago, etc)
- for sequences of actions (he opened the door, took a knife and cut the butter)
- for actions that interrupt general circumstances (I was reading the newspaper when you arrived).
I have lived (and present perfect in general)
- for actions that took place in the past but are still true now, with relevant consequences for the present) (I have played tennis for 2 years --- (= I still play tennis)
I have lost my keys (=I still haven't found them).
I have bought some beer (the beer is still in the fridge).