How does one express "On the way to or from school"? Is 上下班 okay?
One the way = 途中


On the way to school - 上学途中

On the way to work - 上班途中

On the way home - 回家途中

On the way home from school - 放学回家途中

On the way home from work - 下班回家途中

We say 上下班 because it is short for "上班, 下班"

We usually say  "上学, 放学" not "上学, 下学".  

Although not the logical shortened form, people still use the term 上下学 instead of '上放学' because '上' matching '下' better than '上' matching '放'.

you can replace 下班 with 放工