It's pretty obvious that if $n=1$ or $D$ is finite, then $M_n(D)$ has only finitely many right ideals.
For the other direction I assume $n=2$ and leave the generalisation to the reader, the proof is a bit like proving there are infinitely many $1$-dimensional subspaces of the plane.
The first step is to see that
$$M_2(D)=\{\begin{pmatrix}a&b\\0&0\end{pmatrix}|a,b\in D\}\oplus \{\begin{pmatrix}0&0\\c&d\end{pmatrix}|c,d\in D\},$$
where the two summands are right ideals not containing any non-trivial proper right ideals (i.e. they are simple).
Now one can think of this as $S^2$ and try to find right ideals, like one tries to find lines in the plane.
I claim that $I(\lambda):=\{\begin{pmatrix}a&b\\\lambda a&\lambda b\end{pmatrix}|a,b\in D\}$ is a right ideal. Indeed:
$$\begin{pmatrix}a&b\\\lambda a&\lambda b\end{pmatrix}\begin{pmatrix}\alpha&\beta\\\gamma&\delta\end{pmatrix}=\begin{pmatrix}a\alpha+b\gamma &a\beta+b\delta\\\lambda(a\alpha+b\gamma) &\lambda(a\beta+b\delta)\end{pmatrix}$$
Now these are infinitely many right ideals if $D$ is infinite (This has to be checked, but this is a direct computation assuming there is an element in both).