The light went out on its own.

Literal

Light [topic-は] by-itself went-out.

ひとりでに ('by itself, of its own accord') is a fixed adverb, literally 'by one person' — used for things happening without external cause. 消える is the intransitive counterpart of 消す ('extinguish'). A description of a spontaneous event.