She used to live there alone.

Literal

She [topic-は] alone there [at-に] was-living.

住んでいた is the past form of the resultative ~ている state — 'was in the state of living [there].' Combined with そこ ('there'), the sentence reads as a past-habitual or 'used to' description. English typically renders this with 'used to live' rather than 'was living,' since English's past progressive tends to imply a temporary action rather than a long-term state. The shift from present-tense 住んでいる to past 住んでいた is a clean illustration of the same resultative construction across tenses.