If you had been ill, you are no longer ill. You were ill at some point in the past. When you were ill is not relevant. The fact is that you were ill and you are now well.
I did not know informs us that you were not aware that the person concerned had been ill.
Typically, you might meet someone whom you had not seen for some time.
This person might tell you that s/he had been ill.
You might reply that:I did not know that you had been ill.
You are both talking about something that took place in the past of which you were ignorant.
If that were changed to present perfect: I did not know that you have been ill, it signifies that the illness was recent. It is not clear whether the person concerned is well again.
The context is necessary to make the details clear.