While I was eating, the radio talked about a car accident near our home. - correct
'While' means you were eating and the radio was talking about the accident at the SAME time.
When I was eating , the radio news talked about a car accident near our home. - not correct
'When' usually means one thing happened, then another thing happened, but not at the same time. When and while are often confused. In this case, you were eating, you stopped eating and the news came on. To make this sentence correct using 'when' (and you are still eating):
I was eating when the radio news talked about a car accident near our home. - correct