When evening came, he probably looked up at the starry sky with curiosity — or so I imagine.

Literal

Night [when-ともなれば] he [topic-は] curiosity [obj-を] hold-[and-て] starry-sky [obj-を] looked-up-[literary past-こともあろう][quotative-と] think.

A literary sentence full of classical/elevated grammar. ~ともなれば ('when it becomes X, when it is X') is a conditional with a slightly retrospective or characterizing nuance. 見上げたこともあろう combines ~たことがある (experiential) with the classical volitional あろう — 'there would have been (occasions when he) looked up.' Archaic probabilistic reasoning about the past.