Let $G$ be a compact connected semisimple Lie group and fix a left-invariant Riemannian
metric $B$ on $G$. Of course, $B$ is completely determined by its value at the identity. Since $G$ is compact and semisimple, the negative of its Cartan-Killing form, which we denote by $\beta$, is a positive definite inner product; the extension of $\beta$ to a left-invariant Riemannian metric is in fact bi-invariant. Next, we diagonalize $B$ with respect to $\beta$, namely, let $f$ be the positive definite symmetric endomorphism of the
Lie algebra $\mathfrak g$ of $G$ such that $B(X,Y)=\beta(f(X),Y)$ for all $X$, $Y\in\mathfrak g$. One computes easily from the Koszul formula for the Levi-Civita connection associated to $B$ that $\nabla_XY=\frac12(\mathrm{ad}_XY+f^{-1}\mathrm{ad}_Xf(Y)+f^{-1}\mathrm{ad}_Yf(X))$ for left-invariant vector fields $X$, $Y\in\mathfrak g$. In particular $\nabla_XX=f^{-1}\mathrm{ad}_Xf(X)$ and we see that the one-parameter associated to $X$ is a geodesic if and only if $\nabla_XX=0$ if and only if $[X,f(X)]=0$. In particular, this condition is satisfied if $X$ is an eigenvector of $f$.

Note that the Koszul formula above also gives
$B(\nabla_XX,Z)=B([Z,X],X])=\frac12\frac{d}{dt}||\mathrm{Ad}_{\exp tZ}X||^2$ at $t=0$,
which checks Denis guess that $t\mapsto\exp(tX)$ is a geodesic if and only if $X$ is a
critical point of the norm-square in its adjoint orbit. In particular, there are infinitely many one-parameter groups which are geodesics if the rank of $G$ is bigger than one.