I mean for the biinvariant metric (but actually any metric would work). In this metric geodesics are translates of 1parameter subgroups so we need only to show that $exp(t X)$ for any X in the lie algebra is a closed curve. Then we can use the standard forms (like the Jordan form) for matrices. My source of doubt comes from the fact that these groups don't seem to be on the list of Riemannian manifolds with periodic geodesic flow.
Clearly there are geodesics which are not periodic. Take the maximal torus of say $SO(4)$, and let $$ X = \begin{pmatrix} J & 0 \\ 0 & \alpha J \end{pmatrix} $$
be in block diagonal form, where $J = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$, with $\alpha$ irrational. Then the geodesic generated by $X$ will be dense in the set of 2x2 block diagonal elements of $SO(4)$, but is not the whole set, hence can't be closed.

$\begingroup$ OK, thanks. But the round metric on $SU(2)\cong S^3$ has closed geodesics. $\endgroup$ Mar 30 '13 at 14:25

3$\begingroup$ Reza This won't work outside $SU(2)$. In a compact Lie group of rank $>1$, you can find irrational geodesics in the torus. $\endgroup$– Ben Webster ♦Mar 30 '13 at 14:31

1$\begingroup$ Just spelling out Ben's comment: compact Lie groups are compact Riemannian symmetric spacesand as such contain totally geodesic flat tori. The maximal dimension of these tori is called the rank of the space. If the rank is greater than one, the flat tori will have geodesics that wind around without closing. On the other hand the list of rankone symmetric spaces is very short: spheres, projective spaces over the real, the complex numbers, and the quaternions, as well as the Cayley plane. The only Lie groups in the list are $SU(2) = S^3$ and $SO(3)$ which is threedimensional projective space. $\endgroup$ Mar 30 '13 at 16:06

1$\begingroup$ Reza, if you're interested in manifolds all of whose geodesics are closed, there is a book by Arthur Besse that has everything that was known about the topic up the the 80's. I don't recall if there is a result saying the the only homogeneous examples are the standard ones, but I think that must be the case. Just don't try to contact the author, he doesn't respond well to email. $\endgroup$ Mar 31 '13 at 14:17

3$\begingroup$ Reza: If all geodesics are periodic and manifold M is simply connected then homology ring of M is generated by a single element. This will help you to rule out many examples you might be thinking about (like flag manifolds except for the ones which are CROSS). $\endgroup$– MishaApr 1 '13 at 17:02