A time phrase (indicating when an action takes/took place) can appear at the beginning of the sentence or before the verbal phrase although the connotations might be slightly different.
几点 (jǐ diǎn ‘what time’) is an exception; it is unusual for 几点 to appear at the beginning of the sentence.
Zuó tiān wǎn shàng xiǎo míng zài jiā xiě xìn 。(= xiǎo míng zuó tiān wǎn shàng zài jiā xiě xìn 。)
Xiaoming was writing letters at home yesterday evening.
(Incorrect: 小明在家昨天晚上写信。(在家写信 is the verbal phrase.))
你几点要去上课？ (Unusual: 几点你要去上课？)
Nǐ jǐ diǎn yào qù shàng kè ？ (Unusual: Jǐ diǎn nǐ yào qù shàng kè ？)\
What time are you going to class?
 Yip, P. C., Rimmington, D., Xiaoming, Z., & Henson, R. (2009). Basic Chinese: a grammar and workbook. Taylor & Francis.
 Teng, W. H. (2016). Yufa! A practical guide to Mandarin Chinese grammar. Taylor & Francis.