He was acting foolishly and reckless enough to start a war.
NK always invites US leaders and diplomats for propaganda purposes.
http://www.cnn.com/2010/WORLD/asiapcf/08/24/north.korea.carter.backstory/index.html
Their favorite ploy is to get a former President to come visit in exchange for a hostage/prisoner. Getting a sitting President to come for nothing in return? It's a propaganda coup of epic proportions.
North Korea is astutely using Trump's ego, and his narcissistic belief that he's an incredible negotiator to dig out of a hole that was decades in the making. Acting as if Trump's sanctions on NK and talks with China "broke" the regime after just a year is silly. This is a regime that allowed millions of it people to starve rather than giving up one single unilateral concession. The current sanctions are a good thing and having an impact, but decades of sanctions by Clinton, Bush, and Obama laid the groundwork for the current sanctions to have their desired impact.
We are to believe that they are somehow scared of Trump, and I find that laughable. If they would've been scared of someone it would've been George W. who was pretty unafraid to confront enemies and terrorists. His launching of multiple wars, and labeling of NK as part of an "axis of evil" surely scared NK more than anything Trump has done. The only fear they likely have is that Trump's such a bozo that he will miscalculate and draw them into a war on the peninsula that they most assuredly do NOT want to fight.
NK has played this game for a long time. They dig themselves into a deep hole due to the pressure of sanctions, and then they suddenly use an event like the Olympics to launch diplomatic efforts and try to get sanctions relief in exchange for unverifiable actions on their end.
If Trump meets with Kim without upfront concessions and agreements, it will be nothing more than propaganda. If, for example, he agreed to meet with Kim on the condition that he first read an apology to Otto Warmbier's family and pay them millions in damages, I'd be OK with it. But we all know that won't happen because Kim isn't going to meet with Trump if he has to make any concrete statements or plans. NK will issue vague pronouncements about what they might do/want to do, but they will agree to absolutely NOTHING before doing this meeting, and if they did, they would just be lying as they've done dozens of times before when they've made agreements and then didn't comply.