$\newcommand{\intrv}[2]{[#1,#2]}
\newcommand{\inv}[1]{{#1}^{-1}}
\newcommand{\abs}[1]{|{#1}|}
\newcommand{\NN}{\mathbb N}
$
The question was answered nicely in other answers. But I'd like to add my two cents for two reasons:
- To show that we can employ completeness of $[0,1]$ instead of compactness to show this.
- Remark in Arturo's post sparked my interest whether AC is actually needed in the proof and if yes, then how much choice is needed.
I am aware that it can happen easily that use of AC goes unnoticed, H. Herrlich devoted the whole chapter named Hidden Choice in his book to this.
So I hope that if I missed something, some of other users of MSE more experienced in working without choice will correct me.
Note 1: I've posted a question asking whether something more interesting can be said about role of AC in this result. I wasn't sure whether post this here on start a new question with giving my own answer - I hope the way I choose is not too of-topic. (In my post, the main topic was two proofs of the result OP is asking about, and then I only had a look where in these proofs AC was used and whether it can be eliminated. So I thought this answer is better suitable here.)
Note 2: This also appeared as Problem 6414 in Kostrikin's book Exercises in algebra:
a collection of exercises in algebra, linear algebra and geometry. Hint at the end of this book suggests the approach using compactness.
Let me start by mentioning a different approach how to show that ideals of the form $M_c$ are maximal.
It is easy to see that if we fix som $c\in[0,1]$ then $\varphi: C[0,1]\to\mathbb R$ defined by $\varphi(f)=f(c)$ is a ring homomorphism such that $\operatorname{Ker}(\varphi)=M_c$. Since it is clearly surjective, we see that $C[0,1]/M_c\cong \mathbb R$. Since the quotient ring is a field, the ideal $M_c$ is maximal.
Let us now turn to the proof of the fact that every maximal ideal has form $M_c$. Let us start with the proof using completeness of $[0,1]$. The proof I give here is basically the same (perhaps more detailed) as in the paper Stephan C. Carlson: Cauchy Sequences and Function Rings,
The American Mathematical Monthly, Vol. 88, No. 9 (Nov., 1981), pp. 700-701, jstor.
Let us denote $C=C[0,1]$.
Theorem: An ideal $A\subseteq C$ is maximal if and only if $A=M_p$ for some $p\in\intrv 01$.
Proof. If $A$ is a proper ideal, then every element $f\in A$ must vanish at some point of $\intrv01$. (Otherwise $f.\frac1f = 1 \in A$.) We can also see that if a sum of two non-negative functions vanishes at some point $p$, the value of each of these functions at $p$ must 0.
Let $A$ be a maximal ideal in $C$. We will show that there is a $p$ such that $A=A_p$. Let $n\in\NN$
and for $1\leq i \leq n$ let $h_i$ be a non-negative function from $C$ such that
$$h_i(x)=0\text{ if and only if }\frac{i-1}n \leq x \leq \frac in.$$
Clearly $$h_1(x)\ldots h_n(x)=0,$$ that is $h_1\cdots h_n\in A$, thus one of the functions
$h_1,\dots,h_n$ belongs to $A$. (Since $A$ is a prime ideal.) Let us denote the function $h_i$ such
that $h_i\in A$ by $f_n$.
Now we have for each $n\in\NN$ a non-negative function $f_n\in A$ such that
$\inv{f_n}(0)=\intrv{a_n}{b_n}$ and $b_n=a_n+\frac1n$. If $m<n$, $f_m,f_n \in A$,
then $f_m+f_n\in A$. Thus there exists $x_{m,n}$ such that $f_m+f_n(x_{m,n})=0$. This implies
that $f_m(x_{m,n})=0$, $f_n(x_{m,n})=0$. Thus
$x_{m,n}\in\intrv{a_n}{b_n}\cap\intrv{a_m}{b_m}$ and
$\intrv{a_n}{b_n}\cap\intrv{a_m}{b_m} \neq \emptyset$, and thus
$$\abs{a_n-a_m}\leq \frac1m, \abs{b_n-b_m}\leq \frac1m.$$
The sequences $(a_n)$, $(b_n)$ are Cauchy sequence and by completeness of $\intrv01$
they have a limit. Since the length of the interval $\intrv{a_n}{b_n}$ is $\frac1n$, both sequences have the same limit,
let us denote it by $p$.
Now let $f\in A$. For any $n\in\NN$ we have $f^2+f_n \in A$. Thus there is a point
$x_n$ such that $f^2(x_n)+f(x_n)=0$. Hence $x_n\in\intrv{a_n}{b_n}$ and
$f_n(x_n)=0$. Since $x_n\to p$, we get $f(p)=0$ by the continuity of $f$. $\square$
Note that the above approach can be applied to a more general situation.
Theorem: Let $X$ be a complete and totally bounded metric space and let $C(X)$ be the ring of continuous real-valued functions on $X$.
An ideal $A$ is a maximal ideal in $C(X)$ if and only if $A=M_p$ for some $p\in X$.
Proof. By total boundedness there is a finite
$\frac1n$-net for every $n\in\NN$. I.e., there is a finite cover $B_{x_1,\frac1n},\ldots,B_{x_k,\frac1n}$
of the space $X$. We put $h_i(x)=\max\{0, d(x_i,x)-\frac 1n\}$ and we construct the sequence $f_n$ analogously as in the above proof.
The zero set of $f_n$ will be a closed ball in
$X$, the diameters of these balls converge to $0$ and their centers form a Cauchy sequences. The rest of the proof is the same
as in the case $X=[0,1]$. $\square$
Now let us have a look at the approach which uses compactness. This is the approach from Arturo's post.
Theorem: Let $X$ be a compact Hausdorff space. Then $A$ is a maximal ideal in the ring $C(X)$ if and only if there is a point $p\in X$ such that
$$A=M_p=\{f\in C(X); f(p)=0\}.$$
The name Gelfand-Kolmogorov theorem is sometimes used for this result. Perhaps more often this name is used for the result that two Hausdorff compact spaces $X$, $Y$ are homeomorphic if and only if the rings $C(X)$ and $C(Y)$ are isomorphic. (Or for the corresponding facts about the Stone-Čech compactification.) The above theorem is part of the proof of this fact.
See e.g. Gillman, Jerison: Rings of continuous functions, p.102 or Johnstone: Stone space p.145.
Proof. Suppose that $A$ is an ideal in $C(X)$ which is not contained in any $M_p$.
This means that for every $p\in X$ there is $f_p\in A$ such that
$f_p(p)\neq0$. Then $$f_p^2(p)>0\text{ and }f_p\in A.$$ The continuity
of $f_p$ implies that $f_p^2>0$ holds on some neighborhood $U_p$
of the point $p$. By compactness of the space $X$ we get that there is a finite
subcover $\{U_{p_1},\ldots,U_{p_n}\}$ of the cover $\{U_p,
p\in X\}$. Let us define
$$g(x)=\sum_{j=1}^n f^2_{p_j}(x).$$
Clearly $g\in A$ and $g>0$ on the whole space $X$, since
$\{U_{p_1},\ldots,U_{p_n}\}$ is a cover. Hence $g.\frac 1g=1\in
A$ and $A=C(X)$, thus $A$ is not a proper ideal. $\square$
How much choice we need for $C[0,1]$?
Let us have a closer look at the above proof for the case $X=[0,1]$ and check where we made some choices.
But I still think that in the case of the unit interval, no choice is needed, since there we can write the function $h_1,\dots,h_n$ explicitly.
EDIT: Originally I thought I've shown much more without invoking ZF. But I did not notice the using of choice to choose the $\frac1n$-net for each $n$ in one of the proofs and to choose the function $f_p$ in another one.
Proof using completeness: We have chosen $f_n$ to be one of the functions $h_1,\ldots,h_n$, but we can simply define $f_n$ to be that function $h_i\in A$ with minimal $i\in\{1,\ldots,n\}$.
So we have shown without using AC that: If $X$ is a complete totally bounded metric space, then every maximal ideal of $C(X)$ is of the form $M_c$.
Proof using compactness: We have chosen a neighborhood $U_p$ on which $p$ is positive. But we can simply take $U_p:=f^{-1}(0,\infty)$.
So we have in ZF: If $X$ is a compact space, then every ideal of $C(X)$ is contained in ideal of the form $M_c$.
How much choice we need for $C(X)$?
I will refer to the book H. Herlich: Axiom of Choice, Lecture Notes in Mathematics 1876.
Further references and original sources of these results can be found there. Here are the results related to this question I was able to find.
Definition 3.23, p.35: A topological space is called Tychonoff-compact provided it
is homeomorphic to a closed subspace of some power $[0,1]^I$ of the closed unit interval.
Proposition 3.24, p.35: These two conditions are equivalent:
(i) $X$ is Tychonoff compact if and only if it is compact and completely regular;
(ii) Ultrafilter theorem
Exercise E3, p.40: A completely regular space $X$ is compact if and only if every ideal in $C(X)$ is fixed.
Exercise E4, p.41: A completely regular space $X$ is Tychonoff compact if and only if every maximal ideal in $C(X)$ is fixed.
p.36: In ZF we have for any metric space: compact $\Rightarrow$ totally bounded and complete.
Theorem 3.27, p.37:
Axiom of countable choice (CC) is equivalent to: Compact = totally bounded and complete.
Theorem 4.70, p.86: Equivalent are:
- Products of compact Hausdorff spaces are compact.
- Products of finite discrete spaces are compact.
- Products of finite spaces are compact.
- Hilbert cubes $[0, 1]^I$ are compact.
- Cantor cubes $2^I$ are compact.
- PIT.
- UFT.