Any resource of the applications of the theory of class fields We all agree that the theory of class fields plays an eminent role in modern number theory.
Nevertheless, what was our main concern is that how to solve various Diophantine equations to which the clues do not appear clear in the theory of class fields. And my question is:  

With respect to the beauty and perfection of the theory of class fields, can we use it to solve some mysterious Diophantine equations? Or can we apply it to other fields in Mathematics, such as Complex Analysis?  

The last question arises as one of my friends used to tell me that there is a mathematician who developes the theory of complex analysis in terms of class fields in one of his books. Nonetheless, when I looked up to his books, I didn't find any hint to this. Moreover, when I asked him about this again, he didn't say much. This stimulates somehow my imagination such that I am wondering if there indeed is such a theory.
Any response is appreciated.   
 A: Let me address the question as to whether class field theory can be used to solve some Diophantine equations.  The answer is certainly yes.  One historical example is given by Kummer's work on Fermat's Last Theorem; this relied on algebraic number theoretic results to do with cyclotomic fields, much of which can be reinterpreted as special cases of class field theory.  (One place to see this discussed is the nice historical chapter on Kummer's work by Michael Rosen
in the book Modular forms and Fermat's Last Theorem (Cornell, Silverman, Stevens eds.).)
At a more basic level, consider the question of solving the following three equations:
$$x^2 + y^2 = p$$
$$ x^2 + 5 y^2 = p$$
$$x^2 + 23 y^2 = p$$
where $p$ is a prime and $x$ and $y$ are integers.
Essentially (i.e. excluding some small primes, namely $p = 2$ in the first,
$p = 2$ or $5$ in the second, and $p = 2$ or $23$ in the third) each of
these questions can be rephrased as asking whether the prime $p$ splits into a product of principal ideals in the extension $K:= \mathbb Q(\sqrt{-D})$,
where $D = 4,$ $20$, and $23$ respectively.
Now the question of whether $p$ splits is easily answered; it is just a 
question of whether the Jacobi symbol $\bigl( \frac{p}{D} \bigr)$ is equal
to $1$ or not.
But the question of whether $p$ splits into a product of principal ideals is more subtle; it is a question of whether $p$ splits completely in the Hilbert class field
$H$ of $K.$
Now in the case $D = 4$, we know that $K$ has class number one, and so $K = H$.
Thus we can solve $x^2 + y^2 = p$ if and only if $p \equiv 1 \bmod 4$.  
If $D = 20$, then $K$ has class number two, and in fact $H = K(\sqrt{-1})$
is the compositum of the field $\mathbb Q(\sqrt{-4})$ and $\mathbb Q(\sqrt{-20})$.  Thus $p$ splits completely in $H$ if and only if $\bigl(\frac{p}{4}\bigr) = 1$
and $\bigl(\frac{p}{20}) = 1$, i.e. if and only if $\bigl(\frac{p}{4}\bigr) = 1$
and $\bigl(\frac{p}{5}) = 1$, i.e. if and only if $p \equiv 1 \bmod 4$ and $p \equiv \pm 1 \bmod 5$, i.e. if and only if $p \equiv 1 \text{ or } 9
\bmod 20$.
Finally, if $D = 23$ then $K$ has class number three, and so $H$ is not an abelian extension of $\mathbb Q$; rather it is an $S_3$-extension.  The equivalence of class fields and abelian extensions says that $H$ is not a class field of $\mathbb Q$, and so there is no congruence condition on $p$ that determines whether or not $p$ splits completely in $H$.  Thus there is no congruence condition on $p$ that determines whether or not we can solve
$x^2 + 23y^2 = p$.
Instead, one has the following result from non-abelian class field theory
(due, in this case, to Hecke, but best understood from a modern viewpoint as being a special case of Langlands's general program for non-abelian class field theory):
We can solve $x^2 + 23y^2 = p$ if and only if the coefficient of $q^p$ in the product 
$$q\prod_{n=1}^{\infty}(1-q^n)(1-q^{23 n}),$$
which is a priori equal to $-1,0,$ or $2$, is in fact equal to $2$.
Computing the product, one finds e.g. that the first such prime is $p = 59 =
6^2 + 23\cdot 1^2$.
(This infinite product is a certain modular form, which is a particular kind of non-abelian analogue of a Jacobi symbol.)
Whether class field theory has applications to complex analysis, I don't know,
but the appearance of modular forms at the end of the above discussion shows that complex analysis has applications to class field theory.
