In order to use Lagrangians in QM, one has to use the path integral formalism. This is usually not covered in a undergrad QM course and therefore only Hamiltonians are used. In current research, Lagrangians are used a lot in non-relativistic QM.

In relativistic QM, one uses both Hamiltonians and Lagrangians. The reason Lagrangians are more popular is that it sets time and spacial coordinates on the same footing, which makes it possible to write down relativistic theories in a covariant way. Using Hamiltonians, relativistic invariance is not explicit and it can complicate many things.

So both formalism are used in both relativistic and non-relativistic quantum physics. This is the very short answer.

Let me begin with QED. I will subsequently connect with QCD. There are 4 kinds of divergence in QED:

Ultraviolet divergences. Naive calculations depend on the cut-off in such a way that they go to infinity as the cut-off do. However, QED is a perturbatively renormalizable theory so that non-naive, well-done computations (see regularization and renormalization) give sensible results.

Landau pole. The coupling constant $\alpha={e^2\over \hbar \, c}$, which is the expansion parameter in the perturbative series, grows with energy and goes to infinity for a finite value of the energy. It turns out that this finite value of energy is larger than the electroweak scale, where QED merges with the weak interaction and QED is not a good theory of nature anymore. Therefore, it isn't a real (phenomenological) problem.

Infrared divergences. These are due to the fact that photons are massless. They however cancel out once one takes into account all the effects that contribute to a measurable observable.

Non-convergent series. The $n$-th term of the perturbative expansion is of the form $\left({\alpha\over 2\pi}\right)^{n}\, (2n-1)!!$, so that the series is not convergent but asymptotic because the factor $(2n-1)!!$ grows very fast for large values of $n$. This means that we cannot give a non-perturbative definition of QFT by summing up all the terms of the series. However, the first terms are meaningful and actually give predictions that accurately agree with observations. The 'first terms' are approximately $n\sim {\pi\over \alpha}\sim 430$. And for this value of $n$, $\left({\alpha\over 2\pi}\right)^{n}\, (2n-1)!!\sim 10^{-187}$. Therefore, as long as we are not interested in a precision of one part in $10^{187}$ , this is not a real problem either. Note that QED is the theory of nature that has been confirmed with greatest precision — one part in $10^{9}$ in electron's anomalous magnetic dipole, for which $n=4$.

For QCD points 1, 3, and 4 are more o less the same. However, point 2 doesn't apply since in QCD the coupling constant $\alpha_s$ gets lower with the increasing of energy, and in fact it goes to zero as energy goes to infinity. See asymptotic freedom.

To summarize, infrared divergences are due to not taking into account effects that contribute to the observable magnitude. The asymptotic nature of QFT perturbative expansions prevents a non-perturvative (exact) definition of the theory (through its series), but doesn't entail a practical problem when comparing predictions with measurements. The lack of perturbative divergences and Landau-like poles are a necessary condition for a theory to be well-defined at arbitrarily high energies. However, theories that contain these divergences (ultraviolet or Landau-like poles) can still be very useful at energies above some scale. On the other hand, theories without these divergencies (ultraviolet or Landau-like poles), such as QCD, don't have to be valid to all energies as theories of nature.

As M. Brown points out in the comments, there is a relation between instantons and renormalons and the asymptotic nature of series. Please, see these notes snd the questions Instantons and Non Perturbative Amplitudes in Gravity and Asymptoticity of Pertubative Expansion of QFT

Reply to Graviton's comment: In my opinion, a fundamental theory of nature (whatever it means) should have a non-perturbative definition. If the perturbative expansion is not convergent, it cannot provide this non-perturbative definition. However, in principle, this doesn't necessarily mean that theory cannot have a non-perturbative definition or an exact solution, but this must be given by other means.

## Best Answer

The Lagrangian has many parts that are each guessed at according to symmetry principles, requirements that the theory be well behaved, and reproduce experimental results. It's not something you can do from first principles, because the first principles aren't known. But the aforementioned process took about a 75 years and many Nobel prizes and PhDs were awarded.

The Lagrangian is the thing you integrate over to get the action, but it is used to deduce Feynman rules and calculate scattering amplitudes and cross sections and the like.

It's not too hard to derive the Lagrangian for the electromagnetic field by staring at Maxwell's equations in the manifestly covariant form (

i.e.in terms of the Maxwell Tensor $\partial_\alpha F^{\beta\,\alpha}=\mu_0 J^\beta$), and the geometric insights gained allowed people to generalize this action to non-Abelian theories like QCD.