Generally, it's not polite to say to someone "You look ill". It's possible they're just very tired or stressed so they might not appreciate being told they look ill. Mind you, that's in BrE where we tend to be quite polite! You might say "Are you OK? You look a bit peaky?" or "Are you OK? You look a bit under the weather today" but with the exception of my family members and very close friends, I've never told anyone they actually look ill.
In your dialogue example, "What's the matter?" could also come across as rather abrupt and potentially impolite. Using "Are you OK?" is safer.
Again, in other variants of English, the more "straight down the line" approach might be perfectly acceptable.