I have found many proofs for this using pumping lemma, I'm curious of how to proof it via Myhill-Nerode theorem.
Suppose $L= \{a^p \mid p \text{ is prime}\}$ is regular. Then we have congruence such $u ∼ v ⇒ uw ∼ vw$ of finite index $k$, so it has $k$ equivalence classes. $L$ is union of some of its equivalence classes.
Let's choose $aa,aaa,...,a^{p_k},a^{p_{k+1}}$, where $p_k$ is $k$-th prime. Then, there exists $i,j$ from $\{1,...,k+1\}$, that $a^i∼a^j$. Now we should concatenate some word to $a^i$ and $a^j$, that one of the words is in $L$, while the other is not, but in contradiction, they are in the same equivalence class.
Any ideas?