She was alone in the room.

Literal

She [topic-は] room [in-に] one-person [with-で] was.

1人でいた — で marks the accompanying state ('by herself') with the existence verb いる.