The correct answer is: We knew he was ill.

The verb "knew" is in the past tense, which indicates that the action of knowing happened before the time of speaking. The verb "was" is also in the past tense, which indicates that the state of being ill happened before the time of speaking.

The options A, B, and C are incorrect because they use the present tense. The present tense is used to describe actions or states that are happening now or that happen regularly. In this case, the action of knowing and the state of being ill happened in the past.

The option D is incorrect because it uses the past perfect tense. The past perfect tense is used to describe actions or states that happened before another action or state in the past. In this case, there is no other action or state in the past that the action of knowing or the state of being ill happened before.

Therefore, the correct answer is: We knew he was ill.