I get this sentence wrong every time, and I've had it six times this lesson so far. It doesn't make sense to me in either language, so I always get at least one word wrong no matter which way they want me to translate it. I think it means "She's the one with the yellow hat." Oh well.
Answering this as someone who has lived in Denmark their entire life: Yes, this is a sentence that is used in Danish. Though you can use it in the scenario that petrenko wrote, in my experience, it is more used in scenarios like the following:
A: Min datter er på dette billede. (My daughter is in this photo.)
B: Hvilken af dem er din datter? (Which of them is your daughter?)
A: Det er hende hvis hat er gul. (It is her whose hat is yellow.)
Or a scenario like this one:
A: Jeg snakkede lige med Laura. (I just spoke to Laura.)
B: Hvem er Laura? (Who is Laura?)
A: Det er hende hvis hund er løbet væk. (It is her whose dog ran away.)
You can say it in different ways, but this sentence is common.
In the first scenario, you could also have said: Det er hende med den gule hat (It is her with the yellow hat)
And in the second scenario: Det er hende med hunden, som er løbet væk (It is her with the dog that ran away)
surely if we replace 'hat er gul' with something else, it's easy to make a useful sentence.
'Det er hende hvis hund er løbet væk' - 'it is her whose dog ran away'
So you could be asking people if anyone has lost their dog, someone points to a woman and says "it is her whose dog ran away"