Generators of invariant polynomials of semisimple Lie algebra Suppose $\mathfrak{g}$ is a complex semi-simple Lie algebra. By a theorem of Chevalley, we know that $S(\mathfrak{g})^\mathfrak{g}$, i.e. the $\mathfrak{g}$ invariant polynomials, is generated by $l$ homogeneous polynomials where $l$ is the rank of $\mathfrak{g}$. The degrees of the generators are known, namely they are the primitive exponents. I am wondering if the generators can be canonically chosen. For example, when we are considering $\mathfrak{sl}(2,\mathbb{C})$, we can take the generator to be the Casimir. Does such kind of canonical choice exist in general?
 A: Here are some topological considerations that privilege a choice of generators up to scale. First, Chern-Weil theory gives an isomorphism
$$S(\mathfrak{g}^{\ast})^{\mathfrak{g}} \cong H^{\bullet}(BG, \mathbb{C})$$
sending an invariant polynomial $f$ to the characteristic class of principal $G$-bundles given by evaluating $f$ on the curvature of a connection. Here $G$ is the corresponding simply connected complex Lie group, or if you prefer its maximal compact. 
Second, rational homotopy theory gives an isomorphism
$$H^{\bullet}(BG, \mathbb{C}) \cong S( \left( \pi_{\bullet}(BG) \otimes \mathbb{C} \right)^{\ast} )$$
which singles out some particularly nice choices of generators of $H^{\bullet}(BG, \mathbb{C})$, namely dual bases of graded bases of $\pi_{\bullet}(BG) \otimes \mathbb{C}$. If $\pi_{\bullet}(BG) \otimes \mathbb{C}$ has rank at most $1$ in each degree then this graded basis is unique up to scale, and hence the corresponding dual basis is also unique up to scale. To fix scales up to sign you can take a basis of $\pi_{\bullet}(BG) \otimes \mathbb{C}$ which lifts to a basis of the torsion-free part of $\pi_{\bullet}(BG)$. 
In fact $\pi_{\bullet}(BG) \otimes \mathbb{C}$ has Poincare series $\sum t^{2e_i}$ where the $e_i$ are the exponents of $G$, so the above condition is satisfied whenever the exponents are distinct, and this happens for all simple $\mathfrak{g}$ except sometimes in type $D$ (and this ambiguity can be resolved).
I believe the resulting choice of generators for classical types is given, up to scale, by invariant polynomials of the form 
$$X \mapsto \text{tr}(X^i)$$
as in Humphreys' answer. To see how this works for type $A$ let me work first with the groups $U(n)$ rather than $SU(n)$ or $SL_n(\mathbb{C})$. The sequence of inclusions $U(1) \hookrightarrow U(2) \hookrightarrow \dots$, which has colimit $U$, induces a sequence of maps
$$BU(1) \to BU(2) \to \dots$$
with colimit $BU$. $BU$ has a natural infinite loop space structure given by taking direct sums of complex vector bundles, and so its cohomology is naturally a cocommutative Hopf algebra. Moreover the isomorphism
$$H^{\bullet}(BU, \mathbb{C}) \cong S( \left( \pi_{\bullet}(BU) \otimes \mathbb{C} \right)^{\ast} )$$
is an isomorphism of Hopf algebras, where the RHS should be interpreted as the universal enveloping algebra of an abelian Lie algebra. Hence the distinguished choice of generators above corresponds to a choice of primitive elements in this Hopf algebra, of which there is one in each even degree. 
On the other hand, $H^{\bullet}(BU, \mathbb{C})$ is known to be isomorphic, as a Hopf algebra, to the Hopf algebra of symmetric functions, with the isomorphism given explicitly by sending the $i^{th}$ Chern class $c_i$ to the elementary symmetric function $e_i$. The primitive elements of the Hopf algebra of symmetric functions, over a field of characteristic $0$, are given by linear combinations of the power symmetric functions $p_i$, and tracing back through all of the isomorphisms we've written down these correspond to the trace functions $X \mapsto \text{tr}(X^i)$. The corresponding characteristic classes are the coefficients of the Chern character. 
This is all a long-winded way of saying "among the characteristic classes of complex vector bundles we can single out the ones that behave as nicely as possible with respect to direct sum. The Chern character is additive with respect to direct sum and so it's reasonable to single out its coefficients." 
In the other classical types suitable choices of embedding into $U(n)$ should also reproduce this result. The ambiguity in type $D$ comes from the classifying spaces $BSO(4n)$, where the Euler class has the same degree as a Pontryagin class. The Pontryagin class can be distinguished by the fact that it is stable, or in other words by the fact that it is the pullback of a class on $BSO(4n+1)$, and similarly the Euler class can be distinguished by the fact that it vanishes when pulled back to $BSO(4n - 1)$. 
A: Especially for exceptional types it seems quite difficult to exhibit any explicit basic set of generators for the algebra of invariant polynomial functions on $\mathfrak{g}$.   They are of course theoretically given by trace functions.   Keep in mind that Chevalley's theorem involves a comparison with Weyl group invariants in the algebra of polynomial functions on a Cartan subalgebra.   (This is a standard textbook argument, usually following Steinberg's streamlined method.   See for instance $\S 23$ of my 1972 Springer graduate text and the notes at the end.)    In particular, this is how one computes the well-defined degrees in Chevalley's framework of arbitrary finite reflection groups acting naturally on polynomials.
The algebra of polynomial invariants for a Weyl group $W$ (or other non-crystallographic finite reflection group) has been studied in many papers.   For example, the smallest degree 2 leads back to a choice of Casimir operator of degree 2, by a sort of "lifting" process to $\mathfrak{g}$.   But along the way to the computation of the center of the universal enveloping algebra of $\mathfrak{g}$, there is a twist by the special weight $\rho$ (sometimes called $\delta$ in older literature).    
For the finite reflection groups there is in fact a notion of "canonical" set of generators for the invariants.   See for instance a recent paper and its references: Norihiro Nakashima and Shuhei Tsujie, A canonical system of basic invariants of a finite reflection group, J. Algebra 406 (2014), 143–153.   But even when these are written explicitly,  lifting them to invariant polynomials on $\mathfrak{g}$ will not be easy in most cases.
It may help to look at earlier questions and answers on MO such as this one.
ADDED: In the classical cases, I had overlooked a relevant exercise in Bourbaki (Chap. VIII, $\S13$, Exer. 13) which may give the simplest description of $\ell$ generators of the invariant polynomial functions, when $\ell$ is the rank.  It's worth quoting the list (with $X \in \mathfrak{g}$):
$A_\ell$: functions $X \mapsto \mathrm{Tr}(X^i)$ for $2 \leq i \leq \ell+1$;
$B_\ell$: functions $X \mapsto \mathrm{Tr}(X^{2i})$ for $1 \leq i \leq \ell$;
$C_\ell$: functions $X \mapsto \mathrm{Tr}(X^{2i})$ for $1 \leq i \leq \ell$;
$D_\ell$: functions $X \mapsto \mathrm{Tr}(X^{2i})$ for $1 \leq i \leq \ell -1$
along with one of the two polynomial functions $\tilde{f}$ such that $\tilde{f}(X)^2 = (-1)^{\ell} \det(X)$.
It's not surprising that the lists for types $B_\ell,C_\ell$ agree, since these invariant polynomials are "lifted" from Weyl group invariants and the corresponding Weyl groups are isomorphic.   Note too the arbitrary choice of one generator in type $D_\ell$, which suggests that a "canonical" choice here isn't likely.
A: In $\mathfrak{sl}(2,\mathbb{C})$, there is only one one-dimensional homogeneous space generating $S(\mathfrak g)^{\mathfrak g}\cong \mathbb C[X]$. Hence the canonical choice.
In general, you can start with $l$ homogeneous generators $f_1, \dots f_l$ of respective degrees $d_1, \dots, d_l$ and make replacements of the form $f_i':=f_i+f_jf_k$ whenever $d_i=d_j+d_k$. I don't know any way to state that one basis is more canonical than the other (it does not mean that some basis are not nicer than others).
For instance, here are two classical ways to construct homogeneous invariants in $\mathfrak{sl}(n,\mathbb{C})$.
-Compute the characteristic polynomial of a general matrix. Then the coefficients of the polynomial are homogeneous generators of $S(\mathfrak g)^{\mathfrak g}$
-Compute $Tr(X^k)$ ($2\leqslant k\leqslant n$).
(This is pretty much the same as the difference between the elementary symmetric polynomial and the power sum symmetric polynomials)
Note that the last construction can be generalized (at least, theoretically) for any semisimple Lie algebra. 
Theorem: The vector space $S^n(\mathfrak g)^{\mathfrak g}$ of homogeneous invariants of degree n is spanned by polynomial functions of the form $x\mapsto Tr(\rho(x)^n)$ where $\rho$ is a finite dimensional representation of $\mathfrak g$. (Ref: Tauvel-Yu, Lie algebras and algebraic groups, 31.2.5)  
