Wiktionary
serve someone right
vb. 1 (&lit serve right English) 2 (context idiomatic Of an unpleasant event English) To happen to someone who is thought to deserve it.