The instant she was alone, she opened the letter.

Literal

She [topic-は] all-alone became [the instant-とたん], that letter [object-を] opened.

ひとりきり intensifies plain ひとり ('alone') with the suffix きり ('only, nothing but'), giving 'completely alone, all by oneself with no one else around.' The same きり generates 二人きり ('the two of us, with no one else'), 一度きり ('only once'), and similar focused-exclusive expressions. ~たとたん(に) is one of Japanese's several 'as soon as' constructions, but it specifically conveys an instantaneous, often surprising or unintended next event — different from ~たらすぐ ('right after'), which is more neutral. Together, ひとりきりになったとたん paints a picture of someone who could barely wait, opening the letter the moment privacy arrived.