The reason(s) can be gleaned from the previous year's Country Reports on Terrorism, released (regularly) by the State Department. Basically, it says that (1) NK hadn't sponsored a terrorist attack in a long time (it happened to be a 20 years anniversary) and (2) the US had formally committed to [at least envisaging] this step as part of the nuclear deal then pursued.
The Democratic People's Republic of Korea (DPRK) was not known to have sponsored any terrorist acts since the bombing of a Korean Airlines flight in 1987. The DPRK continued to harbor four Japanese Red Army members who participated in a jet hijacking in 1970. The Japanese government continued to seek a full accounting of the fate of the 12 Japanese nationals believed to have been abducted by DPRK state entities; five such abductees have been repatriated to Japan since 2002. In the February 13, 2007 Initial Actions Agreement, the United States agreed to "begin the process of removing the designation of the DPRK as a state-sponsor of terrorism."
The full text of the latter agreement can be found (nowadays) only a Japanese official site (they were part of the six participants). In return (for this a quite a few other carrots) NK promised to fully renounce its nuclear programs:
[...] includes provision by the DPRK of a complete declaration of all nuclear programs and disablement of all existing nuclear facilities, including graphite-moderated reactors and reprocessing plant [...]
which of course they didn't do... Wikipedia has a longer article on the six party talks and how they eventually flopped. Basically the NK issued a declaration of programs that the US said was incomplete, and so it didn't release the aid promised (among the carrots). In response NK resumed missile and nuclear tests... as well a military confrontation with South Korea.
Of some interest in regard to the terrorism designation, the Obama administration decided that the subsequent [mostly naval] confrontations with South Korea were purely military, and thus did not add NK back to the terrorism list. Trump added NK back to the list after the assassination (with the nerve agent VX) of Kim Jong-Nam in Malaysia; at least assassination(s) abroad were mentioned in the Trump statement:
“In addition to threatening the world by nuclear devastation, North Korea repeatedly supported acts of international terrorism including assassinations on foreign soil,” Trump said.