Does the sentence of “Don’t you …”? have a connotation of accusation?
Solution 1:
You use don't you when you believe that the person you're speaking to would or should do the verb that follows. It can be accusatory:
"Don't you care how much you're hurting her?"
but it doesn't have to be. Another use is when you're surprised or incredulous:
"Don't you want the rest of your ice cream?"
Harry is using it more this way. He does have an accusation later, but the don't you isn't about whether Malfoy would or should know how she got the diary, it's about him wanting to know.
Generally you use do you when you have no assumption about the answer, no "would" or "should":
"Do you like dogs?"
I'm sure some other answerer will have a formal way of describing this, but this is my sense of how you choose between them.