Do they both mean 'have you brushed your teeth? No, they don't.
Just this one "刷牙了吗?" is the meaning that have you brushed your teeth?
In my opinion, this sentence, 你刷牙吗? means you're asking someone about his hygiene habit.
When you ask me the question, 你刷牙吗, I will answer you, "Of course, I always brush my teeth!"
That's what the difference is.