Non-abelian class field theory and  fundamental groups Over the years, I've been somewhat in the habit of asking questions in this vein to experts in the Langlands programme. 
As is well known, given an algebraic number field $K$, they propose to replace the reciprocity map 
$$A_K^\*/K^*\rightarrow Gal(K^{ab}/K)$$ of abelian class field theory by a correspondence between the $n$-dimensional representations $\rho$ of $Gal(\bar{K}/K)$ and certain automorphic representations $\pi_{\rho}$ of $GL_n(A_K)$. (We'll skip the Weil group business for this discussion.) Substantial arithmetic information is carried on either side by the $L$-functions, which are supposed to be equal.
This involves  deep and beautiful mathematics whenever something can be proved, and there are many applications, such as the Sato-Tate conjecture or this recent paper of Chenevier and Clozel:
http://www.math.polytechnique.fr/~chenevier/articles/galoisQautodual2.pdf
(I mention this one because it is in some ways very close to the point of this question.)
However, there are elementary consequences of abelian class field theory that seem not to have obvious non-abelian analogues. The one I wish to mention today has to do with the fundamental group. Given a number field $K$ (assume it's totally imaginary to avoid some silly issues), how can we tell if it has non-trivial abelian unramified extensions? Class field theory says we can look at the class group, which is quite computable in principle, and even in practice for small discriminants. But now, suppose we go on to ask the non-abelian question:  which number fields have $$\pi_1(Spec(O_K))=0?$$ That is to say, when does $K$ have no unramified extension at all, abelian or not? As far as I know, there is no easy answer to this question. Niranjan Ramachandran has pointed out that there are at least ten examples, $K=\mathbb{Q}$ (oops, that's real) and $K$ an imaginary quadratic field of class number one. I know of no others. Of course I would be happy to collect some more, if someone else has them lying around. 
But the question I really wanted to ask is: Suppose  we are in a Langlands paradise where everything reasonably conjectured by the programme is a theorem. Does this give a way to algorithmically (as we run over fields $K$) resolve this question  as in the abelian case? Otherwise, is there a sensible refinement of the usual formulation that would subsume such applications?
Added: 
I'm embarrassed to admit I hadn't followed the question mentioned by David Hansen (even after commenting on it). Thanks to David for pointing it out. Of course my main question still stands. I've changed the title following Andy Putman's suggestion. The original title evolved from a (humorously) provocative version that I normally use only among friends who already know I'm a Langlands fan: 'What is the Langlands programme good for?'
Regarding jnewton's very natural thought: in addition to other difficulties, one would also need to bound $n$.

Added, 13 July:
Here is one more remark concerning jnewton's suggestion.  Of course in the realm of classical holomorphic
cusp forms, there are infinitely many of level one. More generally, it is shown in the paper 
http://www.math.uchicago.edu/~swshin/Plancherel.pdf
that whenever $G$ is a split reductive group over $\mathbb{Q}$, there are infinitely many cuspidal automorphic
representations  that are unramified everywhere and belong to the discrete series at $\infty$. (I presume there are other results of this sort. This one I just happen to know from a talk
last Fall.) According to Clozel's conjecture as you might find in
http://seven.ihes.fr/IHES/Scientifique/asie/textes/Clozel-juil06.pdf
(conjecture (2.1)), algebraic ones among them should correspond to motivic Galois representations (after we choose a representation
of the dual group)*. 
I don't have the expertise to recognize algebraicity in such constructions, in addition to the danger that I'm misunderstanding
 something  more elementary. But it seems to me quite a task to show directly that there are none corresponding to Artin representations. (The only case I could do myself is the classical one.)
Now, I would like very much to be corrected on all this.
But such families do seem to indicate that  a 'purely automorphic' approach to
the the $\pi_1$ question is somewhat unlikely, at least within the current framework of the Langlands correspondence. 
I suppose I'm sabotaging my own question.

*Note that in  these situations, the
 Galois representations don't have to be unramified, since there is the choice of a coefficient field $\mathbb{Q}_p$. In general, they should only be crystalline at $p$.

Added 14 July:
Matthew: Since I didn't really expect a complete answer to my question, if you could write your extremely informative series of comments as an answer,  I will accept it. (Barring the highly unlikely possibility that someone will write something better between the time you submit your answer and the time I look at it.)
 A: I'm going to take the step of disagreeing slightly 
with the perspective offered in Professor Emerton's answer,
in a bold attempt to prise away the green for myself.
The question is, what does the Langlands program have to say about
the finiteness (or otherwise) of $\pi_1(\mathcal{O}_K)$?
Let's first revisit what one knows by ``classical'' methods.
Minkowski proved that if $K$ is an extension of degree $n$, then
$$\sqrt{|\Delta_K|} \ge \left(\frac{\pi}{4}\right)^{r_2} \frac{n^n}{n!},$$
which, asymptotically, implies that the root discriminant
$\delta_K = |\Delta_K|^{1/n}$ is at least $e^2 \pi/4 - \epsilon$ 
for large $n$, and in particular, that $|\Delta_K| > 1$
if $n > 1$. This is purely a geometry of numbers argument.
What does the Langlands program have to say about this question?
First, let me ask a related question: what does the Langlands program say about
elliptic curves $E/\mathbb{Q}$ with good reduction everywhere? 
In this case, it implies (and is known, by Wiles!)
that there exists a classical cuspidal modular
form 
$$f \in S_2(\Gamma_0(1)).$$
 The latter group vanishes, and so $E$
does not exist. Yet this latter fact seemingly requires an actual computation
- namely, that $X_0(1)$ has genus zero. This could be tricky if one wants
to replace $E$ by an abelian variety $A$ of (varying)
dimension $g$, or replace $\mathbb{Q}$ by another
field $F$. It turns out, however, that one can show that $f$ does not exist
purely from the existence of the relevant functional equation - more
on this later.
Let us return to our original question. Suppose we have a field
$K$ unramified everywhere over $\mathbb{Q}$. It has been suggested
that one should ponder the existence of algebraic automorphic forms $\pi$
for $\mathrm{GL}_n/\mathbb{Q}$ associated to
irreducible Artin representations $\rho$ of 
$\mathrm{Gal}(K/\mathbb{Q})$. However, it is more natural
to consider the regular representation. 
In this case, it is (of course) known by Hecke that 
$\zeta_K(s)$ has a meromorphic continuation that is entire away from
$s = 1$, and, moreover, that $\zeta_K(s)$ satisfies a functional
equation of a precise type. 
Now, purely given the existence of the functional equation for
$\zeta_K(s)$, Odlyzko gives a formula(!) for $\log |\Delta_K|$
as some function of $s$ involving the roots of $\zeta_K$ 
(the function is (obviously) constant, but is not obviously constant).
One then deduces a lower bound for
$\delta_K$ of the form $2 \pi e^{\gamma} - \epsilon$, which is
better than Minkowski's estimate. (Odlyzko's method can be refined
to give better bounds.)
What is easy to miss in this argument is
that role that the Langlands conjecture plays in this argument -
 in this case the theorem of Hecke - is already
known! One might claim that this argument uses "more" than
Langlands and ask for an argument that is purely algebraic and
geometric (and here by "one", I mean Brian Conrad or
Chevalley), but I think this is a little misguided. After all, I
think it would be hard to prove that there does not exist any
Maass form for $\mathrm{SL}_2(\mathbb{Z})$ of eigenvalue
$1/4$ without using some analysis.
Can one argue similarly to see that there are no abelian varieties
$A$ with good reduction everywhere? Indeed, Mestre gave such
an argument (before Fontaine!). Namely, if $A$ is an abelian variety,
and $L(A,s)$ is automorphic in the expected sense, then $A$ has
conductor at least $10^{g}$. Moreover, this is close to optimal
($X_0(11)^g$ has conductor $11^g$).
There are other arguments along these lines.
Stephen Miller (and Fermigier independently)
 proves that there
are no cusp forms
for $\mathrm{SL}_n(\mathbb{Z})$
of "weight zero" (cohomological with the same infinitesimal character as the trivial representation) and "level one" for all $n$ in the range $2 \ldots 23$ - another generalization
of the fact that $X_0(1)$ has genus zero - using Rankin--Selberg
L-functions. 
Here is a final reason why one should expect some analysis.
All of these arguments fundamentally require the discriminant
of $K$ to be small. Any ``algebraic''  method should be
expected to work more generally. Yet consider the question of whether
 $\pi_1(\mathcal{O}_K)$ is finite when $\delta_K$
is large.  The only known method for answering this question
is producing an unramified extension $L/K$ such that the GS-inequality
applies to
$\pi_1(\mathcal{O}_L)$. The question on whether these groups
are (always?) infinite when $\delta_K$ is sufficiently large is
wildly open, and I know no good heuristics on this question.
A: In response to Minhyong's request, I am reposting my comments above as an answer:
As James Newton commented, if $L/K$ is unramified, then an irreducible $n$-dimensional
representation (over $\mathbb C$) of $Gal(L/K)$ will correspond, in the Langlands paradise,
to a cuspidal automorphic representation of $GL_n(\mathbb A_K)$.   The cuspidal automorphic representations that arise in this way are sometime (especially in the older literature)
called "Galois type".
Thus one can (more or less --- there is the issue of irreducible vs. all reps. which
I won't think about here) encode unramified extensions of $K$ whose Galois groups
admit $n$-dimensional representations in terms of Galois type cuspidal automorphic representations $\pi$ of $GL_n(\mathbb A_K)$ that are unramified at every finite prime.
Now the question arises: how many such $\pi$ are there, and can one compute them?
Being of Galois type is (conjecturally, but we are in paradise!) purely a condition
on $\pi_v$ for primes $v$ of $K$ lying over $\infty$, and in fact there are a finite
number of prescribed representations of $GL_n(K_v)$ ($= GL_n(\mathbb R)$ or
$GL_n(\mathbb C)$) which are allowed.  (E.g. for $GL_n(K)$, the possibilities are
limit of discrete series, corresponding to holomorphic weight one forms, or principal series with $\lambda = 1/4$, corresponding to Maass forms with eigenvalue of Laplacian equal to $1/4$.)  For a given $n$ and $K$, these can be enumerated.
Now since we are asking that the "weight" (i.e. the collection of $\pi_v$ for $v|\infty$) be bounded
(i.e. lie in a given finite set), and we are also asking that "level" be one (i.e. that there is no ramification at any finite prime), there are only a finite set of $\pi$
corresponding to irreducible everywhere unramified $n$-dimensional complex representations 
of $GL_n(Gal(\bar{K}/K)$.  [Aside: Minhyong asked for a sketch of a proof of this; here goes: fixing the representation at infinity means that we are fixing a bunch of elliptic operators
that the automorphic forms must satisfy.  Fixing the level means that we are working on some particular quotient $X/\Gamma$ (here $X$ is the symmetric space attached to the real group
in question, in our particular case $GL_n(K\otimes \mathbb R)$, and $\Gamma$ is the fixed 
level).  This need not be compact (indeed won't be in our particular case), but the cuspidal condition (indeed, even the moderate growth condition that non-cuspidal automorphic forms
are required to satisfy) means that we can pretend it is, since we explicitly rule out the possibility of extreme growth at infinity.  So now we looking at sections of some bundle on a compact space satsifying a bunch of elliptic equations, and such a space of sections if finite dimensional.  (The holomorphic modular forms case is the most familiar: in this case the elliptic equations are the Cauchy--Riemann equations. In the Maass form case, the corresponding fact is the finiteness of the eigenspaces of the Laplacian.  These are
good models for the general case.)]
To actually compute them (say for a fixed choice of $K$ and $n$) would be quite difficult 
(as David Hansen notes in his comment).  The reason is that the relevant $\pi_v$ for
$v|\infty$ are never discrete series (even when $n = 2$, and in any case, note that
$GL_n(\mathbb R)$ never has discrete series if $n > 2$, and $GL_n(\mathbb C)$ never has
discrete series when $n > 1$), and so standard applications of the trace formula to counting automorphic forms won't work.
Nevertheless, it seems that one might still be able to use the trace formula to analyze the situation, at least in principle.  For example, Selberg used his original formulation of the trace formula for $SL_2(\mathbb R)/SL_2(\mathbb Z)$ to compute cuspidal Maass forms of level 1,
and showed that the smallest eigenvalue $\lambda$ that occurs has $\lambda$ much greater than 1/4 (maybe closer to 90?).
And we all know that it is not hard to show that there are no holomorphic weight one forms 
of level one.  So one can automorphically prove (modulo standard conjectures in the Maass form case) that there are no everywhere unramified two-dimensional complex representations of $Gal(\bar{\mathbb Q}/\mathbb Q)$.   (This is of course an incredible battle, even in paradise, for a tiny portion of the information that Minkowski gives us, but is meant just to illustrate that this approach is not a priori ridiculous.)
What I don't see at all from this point of view is how to study all $n$ simultaneously.
For example, one could imagine implementing this program and finding, for some $K$ and some $n$, maybe $n = 10^6$, that there are no unramified extensions $L/K$ with $L$ admitting an irrep. of dimension $\leq 10^6$.  This doesn't rule out the possibility that there is a beautiful, everywhere unramified extension $L/K$ whose Galois group's lowest degree irrep. happens to be of enormous dimension.  
The Langlands program seems to be intrinsically geared to thinking about linear representations of Galois groups, and to set the scene, you have to begin by choosing a linear group, which will then cut everything else down in a Procrustean manner.
At least superficially (and this answer reflects just superficial thoughts about the
question), it doesn't seem well adapted to questions related to the nature of
$\pi_1(\mathcal O)$, where no a priori linear structure is given, or indeed expected.
[Added July 14, in response to Minhyong's question in the comments as to whether or not discrete series can convert into non-discrete series after applying some functoriality.
The answer is essentially no, as I will now explain.
Added November 29, 2011: What follows is wrong; the answer seems rather to be yes.
(See below for details.)
For an arithmetic geometer, one should think of an automorphic form on the adelic group
$G(\mathbb A_K)$ as a morphism from the motivic Galois group (over the base number field $K$) to the $L$-group of $G$.  (There are subtleties and caveats, of course, but they need not concern us here; all I will say about them is that automorphic forms can give rise to "motives" with non-integral $(p,q)$ in its Hodge decomposition, which necessitates enlarging the category of motives to an unknown larger category, whose hypothetical Tannakian group is called "the Langlands group".)  
Now functoriality takes place when you have a map from the $L$-group of $G$ to the $L$-group of $H$; one can just compose this with a map from the motivic Galois group to the former, to obtain a map from the motivic Galois group to the latter.  Functoriality is the assertion
that the corresponding automorphic form on $H(\mathbb A_K)$ exists.
Now given an automorphic form $\pi$, its factors at the primes $v|\infty$ encode (via the local Langlands corresondence for $\mathbb R$ or $\mathbb C$) the Hodge numbers of the corresponding motive.  One feature of discrete series is that (among other properties) they give rise to regular Hodge numbers, i.e. to sequences of $h^{p,q}$ with each $h^{p,q}
\leq 1$.  Now our original automorphic rep'n $\pi$ on $G(\mathbb A)$ corresponds to a motive whose Mumford--Tate group lies in the $L$-group of $G$, and if $\pi$ has discrete series components at primes above $\infty$, it has regular Hodge numbers at every place dividing $\infty$.  If we then pass to a new motive by applying some map from the $L$-group of $G$ to the $L$-group of $H$, then concretely this corresponds to doing some kind of multilinear algebra on our motive, and the only way this can kill the property of having regular Hodge--Tate weights is if we do something like taking the diagonal map from the $L$-group of $G$ into its product with itself, and then embed the latter into the $L$-group of $H$.
All such constructions will necessarily be a "reducible" rep'n of the $L$-group of $G$
in the $L$-group of $H$ (more precisely, the centralizer will be a non-trivial Levi),
and the corresponding automorphic form won't be a cuspform.  
But even if we destroy the property of having regular Hodge numbers, we typically still
don't have an Artin motive.  To get an Artin motive we have to have $h^{p,q} = 0$ unless
$p = q = 0$, and to do this, we have to do even more destructive things, like 
map the $L$-group of $G$ into the $L$-group of $H$ via the trivial representation,
or something similar.
Again, this won't correspond to any kind of interesting automorphic forms, just
those that correspond to (certain) sums of characters.  So we can't produce interesting
Galois type automorphic forms out of automorphic forms whose factors at primes above
$\infty$ are discrete series.]
[Correction added Nov. 29, 2011:  From the Galois/motivic point of view, we have an algebraic group (the Mumford--Tate group of some motive), with a representation (the particular motive), and the Mumford--Tate group contains a cocharacter whose eigenvalues are the Hodge numbers.  Discrete series corresponds to the eigenspaces being one dimensional.
We now apply some functoriality, which is essentially to say that we apply some multi-linear algebraic  process to the representation.  Now this can certainly produce eigenspaces for the cocharacter of multiplicity $> 1$.  (E.g. the adjoint representation of $SL_3$ has a two-dimensional eigenspace.)   So it seems that functoriality doesn't preserve being discrete series.  It does preserve being tempered.  And the remarks about not getting Artin motives still seem okay, since while the eigenspaces can become greater than $1$-dimensional, for all the eigenspaces to become trivial, we have to do something pretty destructive, like applying functoriality for the trivial representation.] 
