This plot problem (Why would an all knowing AI try to harm humans ?) is usually solved via the AI developing a superiority complex. This superiority complex makes it lack mercy towards human folly and failures and demand a very high standard from humans. The AI might simply decide that the major problem of the universe is the humankind and go on about destroying humanity.
This answer better answers the question than the other answers because it follows an utilitarian model of morality/ethics, in other words, we do what is right because somewhere else the right thing will bring good results. The nihilist "you are made of atoms bla bla bla" cant really answer this, because it implies that morality is purelly conventional, and can be broken without real reasons, as if moral was a set of purely arbitrary rules imposed by a superior power without real inherent reasons to be imposed besides the will of the superior being (There is no right or wrong the truth is whatever the strongest happens to impose).
While many people might expose such view about morality and ethics, this does not answer the question at hand because the author explicitly talks about Kant.
Kant believes that there is a fundamental form of morality, based on what the ancients called "golden rule" ("Dont do to the others what you dont want to be done against you.") that implies that he believes that moral is not a purely conventional thing, but the result of a kind of knowledge that can be discovered and learned.
This means that any answer based on a merely conventional concept of morality will not trully answer the question.
With that in mind, the question still stands, why would, under a utilitarian concept of morality (morality as something inherently usefull), a highly intelligent computer AI, able to reason about such utilitarian morality faster and more profoundly than us humans, decide to kill us ?
If he simply decides "heck, whatever morality, i just want to kill humanity", that would mean that morality and ethics is not the result of knowledge and of reasoning, but of pure convention : "I am the most powerfull and I decided to kill you all, because morality is a convention imposed by the strongest."
But, if instead, he, out of a profound process of thought, decides that he should persecute humans relentlessly because that is the GREATER GOOD, then, he must have a REASON.
As such, the USUAL answer to this question (that has implications for philosophy, religion, politcs etc) is that such AI, out of a superiority complex, decided that human folly and egotism is the root cause of all problems and that the universe might be a better place if humans are destroyed and replaced by robots. This is the theme behind Terminator series, for example.
If you want a kantian answer, simple conventional concept of morality is not enough to make a superior AI kill humans, you need a profound REASON, and this reason is, usually, that the AI developed a kind of superiority complex and wants to replace us humans with docile and rational robots.