His shadow on the wall looked sad.

Literal

Wall [on-に] reflected his shadow [topic-は] sad-looking was.

映る means 'to be reflected/projected.' 壁に映った is a relative clause: 'his shadow that was reflected on the wall.' 悲しそうだった uses ~そう (looks like/appears to) with the past tense — 'appeared sad.' An evocative, literary image.