The light went out by itself.

Literal

Light [topic-は] naturally went-out.

自然に ('naturally, on its own') is a near-synonym of ひとりでに but emphasizes 'as nature would have it' rather than 'without anyone causing it.' The two adverbs are close but carry slightly different shades.