While I agree with previous answers that the distinction in the sentences in the question has to do with adjective vs. adverb usage, I also think it's useful to note a related issue concerning the adverbial usage of the specific word importantly, especially in the phrases more importantly and most importantly.
For some reason, importantly was (probably unjustly) targeted by style guides and usage experts in the mid-20th century. After having encountered a couple overzealous older editors who insisted on rephrasing almost any use of the word importantly, I'm somewhat heartened to read answers and comments here by people who seem not to even realize this was once a significant editorial issue.
There's a bit of the history of the controversy here:
In 1968, “Winners and Sinners,” a periodic bulletin published by the
New York Times, noted that, at the head of a sentence, “the adverbial
phrase ‘more importantly’ modifies nothing in the sentence. What is
wanted in constructions of this kind is ‘more important,’ an ellipsis
of the phrase ‘what is more important.’”
Other authorities felt the same way, including Strunk and White’s “The
Elements of Style,” which categorized the sentence-modifying “more
importantly” as a misuse and told writers to avoid it by replacing it
with “more important” or some other term.
Strangely, this flurry of opposition to “more importantly” was
concentrated mainly in the 1960s and ‘70s as people got to thinking
about the term and decided that it didn’t make sense.
Usage guides in the past couple of decades generally tend to downplay this issue or state that it was always an imaginary problem. Bryan Garner in his Modern American Usage notes that this logic simply can't apply to many other sentence adverbs, like notably or interestingly (e.g., one generally wouldn't begin a sentence, "Most notable,..." but rather "Most notably,..."). He goes on to say:
The criticism of more importantly and most importantly has always
been rather muted and obscure, and today it has dwindled to something
less than muted and obscure. So writers needn't fear any criticism
for using the -ly forms; if they encounter any, it's easily
dismissed as picayunish pedantry.
Despite Garner's judgment, I have still in recent years encountered people who appear to adhere to Strunk & White's unjustified statement that the word importantly should always be rephrased. (Actually, in this case, this arbitrary pronouncement seems to originate with White; the rule did not appear in the original Strunk.)
Thus, while there is a distinction to be made between the adjective most important and the adverb most importantly, writers should be aware that there are still those out there who think that even adverbial uses of most importantly are incorrect and should be changed to most important. (By the way, this modification is generally explained in older usage guides by some logic like: at the beginning of a sentence, what you should be saying is "What is most important..." and most important is an abbreviated version of that. Why the word important(ly) among sentence modifiers is singled out for this treatment is never explained.)