How do you know if a operator commutes with the hamiltonian? In the question there is a central potential within a Hamiltonian, and I have to find the appropriate quantum numbers. They say that $j, m, s$, $\ell$ are the appropriate quantum numbers to describe this situation. Why are $m_\ell$ and $m_s$ not included here? And do $J^2$, $m_j$, $S^2$ and $L^2$ always commute with the Hamiltonian or just in this case because of the central potential?
 A: A good guess to start would be to identify classical quantities that are conserved. This is because, for most cases, 
\begin{align}
[\hat H,\hat {\cal O}]=i\hbar\{H,{\cal O}\}_{PB}
\end{align} 
where the operation on the right hand side is the classical Poisson bracket.  
The Poisson bracket is $0$ when the quantity is conserved, so 
in a central field, (in addition to energy) the total angular momentum and the components will be conserved separately.  Here the total angular momentum is $\vec J$ rather than $\vec L$ or $\vec S$.  You’re also allowed to pick one component of $\vec J$ to make a complete set of commuting observables and use their eigenvalues as quantum numbers, since the components do not Poisson-commute one with the other.
In practice, this often works better backwards: if a quantity is NOT conserved classically, it’s unlikely to be conserved quantum mechanically and lead to as useful quantum number.
In the specific case for instance of a 3d harmonic oscillator with axially-symmetric potential
\begin{align}
V(x,y,z)= \frac{1}{2}k_\perp (x^2+y^2) +\frac{1}{2}k_zz^2 \,\qquad k_\perp\ne k_z
\end{align}
then the total angular momentum is not conserved but the $L_z$ projection is, so $m$ as an eigenvalue of $L_z$ would be a good quantum number but not $L$, the magnitude of $\vec L$.
A: Let me answer the first question which is presently the title, and maybe experienced users will direct you to existing resources on Stackexchange to help you sharpen the other questions.
In general, the brute force way to know if two operators commute is to identify a suitable basis for the Hilbert space: a set of states that satisfy completeness. Then write down an arbitrary state $|\psi\rangle$ in the Hilbert space as a superposition of these basis states with arbitrary complex amplitudes. If you know the eigenstates of the Hamiltonian, that is usually the best basis. Then find the action of H on the arbitrary state $|\psi\rangle$, call the result $H|\psi\rangle$. Find the action of your operator O on the state $H|\psi\rangle$, call the result $OH|\psi\rangle$. If this is the same as what you get when you calculate $HO|\psi\rangle$ then the operator O commutes with the Hamiltonian.
