Macduff goes with Malcolm to England to get military support to reclaim the throne from Macbeth. Lennox does not believe Duncan was murdered by his sons and clearly, Macduff is thinking the same thing. I don’t think it is clear that Macduff realizes the implications of his not attending Macbeth’s banquet. It is clear that Macbeth takes this rebuff as Macduff opposing his right to the throne. Also, Macduff cannot know what the weird sisters have said to Macbeth (the first apparition says beware Macduff); so Macduff can’t know just how seriously Macbeth sees him as a threat. Still, I can see how it makes much more sense for Macduff to take his family with him. But I think this is something he could only see in hindsight. Also, no one except Lady Macbeth was privy to Macbeth’s growing insecurities and madness and so no one but her (sans the weird sisters/witches) could foresee Macbeth’s subsequent killing spree.

In Shakespeare's tragedy, Macduff doesn't specifically go to see the king of England. He goes to see Malcolm, the rightful heir to the Scottish throne. He goes in order to join him in a battle against the tyrant, Macbeth.
Macduff is convinced that Macbeth killed King Duncan. He sees Macbeth as a tyrant and a terrible king. He wants to unite with Malcolm to defeat Macbeth and put Malcolm on the throne. It's hard to argue with his reasons for going to England.
The controversial issue concerning Macduff's going to England is actually his leaving his family alone unprotected. His wife judges him harshly for doing so, and Malcolm is so surprised that Macduff left his family unguarded in Scotland that he suspects him of being in league with Macbeth. Malcolm presumably reasons that if Macduff were an agent of Macbeth, then his family would be in no danger. In contrast, if Macduff is not an agent of Macbeth, then Malcolm has to wonder why he would leave his family behind in Scotland. This, in part, leads to the complex series of tests Malcolm puts Macduff through to prove Macduff is not in league with Macbeth.
Of course, once word reaches England that Macduff's family has been slaughtered there's no doubt Macduff is being honest and is not serving Macbeth.