What are the most comprehensive textbooks on the structure of Lie groups and their infinite-dimensional representations if one is interested in their applications to number theory (so covering discrete subgroups and automorphic representations)?
I think the most comprehensive reference would be the following conference proceedings (Proceedings in Symposia in Pure Mathematics) :
- Automorphic Forms, Representations, and L-functions, Parts 1&2, vol. 33
- Motives, Parts 1&2, vol.51
- Representation Theory and Automorphic Forms, vol. 61
However you might be also interested in the following books. An introduction to the Archimedean representation theory is given in "Representation Theory of Semisimple Groups" by Knapp. A slightly more advanced book is "Continuous Cohomology, Discrete Subgroups, and Representations of Reductive Groups" by Borel and Wallach.
There is also a book "An Introduction to Automorphic Representations with a view toward Trace Formulae" by Getz and Hahn. Another recent introductory book is "Eisenstein Series and Automorphic Representations with Applications in String Theory" by Fleig, Gustafsson, Kleinschmidt, Persson.