The traveler was glad to see a light in the distance.

Literal

Traveler [topic-は] distance [in-に] light [object-を] seeing pleased.

遠方に (in the distance) uses a formal word for 'far away.' 明かり (light, a glow) is the nominalized form of 明るい (bright). 見て喜んだ chains seeing with the emotional response.