Commitment vs fact
一定 often signals the speaker's commitment to an action or a strong expectation about the future: 我一定去 (I will definitely go), 他一定会来 (he will definitely come). 肯定 more often signals a judgment about a fact, past or present: 他肯定知道 (he certainly knows), 那肯定是他 (that is certainly him). Both can flip into the other's territory in casual speech, but the default leans split this way.
明天会议我一定参加,而且肯定准时到。
Míngtiān huìyì wǒ yídìng cānjiā, érqiě kěndìng zhǔnshí dào.
I will definitely attend tomorrow's meeting and will certainly arrive on time.
As predicates vs adverbs
一定 is primarily an adverb: it modifies verbs. 肯定 is both an adverb AND a verb itself (to affirm, to confirm). 老板肯定了这个方案 (the boss approved this plan) uses 肯定 as a verb meaning "affirm / endorse". 一定 cannot work as a verb in this sense. When you need "to confirm" as an action, only 肯定 works.
她肯定了我的想法。
Tā kěndìng le wǒ de xiǎngfǎ.
She affirmed my idea.
一定要 as imperative
一定要 (must, definitely must) is a strong imperative or self-commitment: 你一定要来 (you absolutely must come), 我一定要学好中文 (I really must learn Chinese well). 肯定要 also works but sounds less emphatic and more predictive: 他肯定要来 (he will certainly come). The 要 pairing is much more common with 一定.
Negation: 不一定 vs 不见得
不一定 (not necessarily) is the common negation: 不一定 means "not for sure / not necessarily". 不肯定 literally means "not certain" and is grammatical but less common. For "I am not sure", 我不确定 (wǒ bú quèdìng) is more natural than 我不肯定. For "maybe not", 不一定 is the default.
Fixed phrases and set uses
Some contexts lock in one form. 说不定 (shuōbúdìng, maybe / hard to say) is idiomatic and does not swap to 说不肯定. 一定程度上 (to a certain extent) is fixed. 肯定句 (affirmative sentence, grammatical term) cannot swap to 一定句. Learn these as units.