My father usually wears a hat when he's going to stay out overnight.

Literal

Father [topic-は] stay-out-overnight do [when-とき] [contrast-は] usually hat [object-を] wear.

外泊する means 'to stay out overnight' — literally 'outside-lodging.' The ~ときは pattern marks a habitual condition, and たいてい ('usually') reinforces the regularity.