We thought it was wrong to leave her alone.

Literal

Her alone [into-に] leave [topic-は] wrong [quotative-と] we thought.

一人にしておくのは間違っている — 一人にしておく means 'to leave alone.' と思った reports a group judgment.