NoEdit: let me reformulate my answer since I apparently didn't answer the right question.
(a) if $K$ is a compact Lie group, the commuting probability is positive iff $K_0$ is abelian. As you noticed, $\Leftarrow$ is trivial.
Conversely, assume that $K_0$ is not abelian. We can view $K$ as Zariski-closed in matrix group, all its (Lie) components are also Zariski-closed, and are the irreducible components. Hence, if by contradiction the set of commuting pairs has positive measure (or equivalently has nonempty interior, or equivalently has dimension $2\dim K$), then it contains a product of two cosets: $aK_0\times bK_0$ for some $a,b\in K$. So $agbh=bhag$ for all $g,h\in K_0$.
Putting $g,h=1$, we get $ab=ba$. Putting $h=1$, we get $agb=bag=1$ for all $h$ which using $ab=ba$ yields $gb=bg$ for all $g\in K_0$. Putting $g=1$, we get $abh=bha$ for all $h$, which using $ab=ba$ yields $ah=ha$ for all $h\in K_0$. Thus $a,b$ commute and centralize $K_0$. So the formula simplifies as $hg=gh$ for all $g,h\in K_0$.
(b) let $K$ be a compact connected group with positive commuting probability. The property passes to Lie quotients of $K$, which are therefore abelian (the argument in the connected Lie case is contained in the above: the set of commuting pairs is a proper subset). Since $K$ is projective limit of its Lie quotients, it follows that $K$ is abelian.
If $K/K_0$ is finite, we reach the conclusion that $K_0$ is abelian.