If $\operatorname{Spec}(A)$ is a finite discrete set, then $A=\prod_i A_i$, where $A_i$ contains a unique maximal ideal. Lemma 6.2 of Waterhouse's Introduction to Affine Group Schemes has a Lemma stating, for $k$ a field,

Let $A$ be a finite dimensional, commutative $k$ algebra. Then $A$ is a finite direct product of algebras $A_i$, each of which has a unique maximal ideal consisting of nilpotent elements.

Proof: Using the fact that $A$ is finite dimensional, Waterhouse first shows that every prime ideal of $A$ is in fact maximal, and that there are only finitely many primes. Since each is maximal, it follows that in the Zariski topology $Z(P)=\{P\}$, so each point is closed. Hence $\operatorname{Spec}(A)$ is a finite discrete set. 
I understand this, but I lose him when he then immediately states, that hence $A=\prod_i A_i$, (without mention of what $A_i$ is), and that the unique prime in $A_i$ is maximal, and its elements must be nilpotent. 
I know that since $\operatorname{Spec}(A)$ is finite and discrete, each $Z(P_i)=\{P_i\}$ is clopen, hence $Z(P_i)=Z(e_i)$ for an idempotent $e_i\in A$. Does $\operatorname{Spec}(A)=Z(e_1)\sqcup\cdots\sqcup Z(e_m)$ imply somehow that $A\simeq Ae_1\times\cdots\times Ae_m$? I know that if $e$ is an idempotent, $\operatorname{Spec}(A)=Z(e)\sqcup Z(1-e)$ implies $A\simeq Ae\times A(1-e)$, but if there are more than two clopen sets, I'm not sure how it extends. For instance, is $\operatorname{Spec}(A)=Z(e_1)\sqcup Z(e_2)\sqcup Z(e_3)=Z(e_1)\sqcup Z(e_2e_3)$, then we have $1-e_1=e_2e_3$, so that
$$
A\simeq Ae_1\times A(1-e_1)\simeq Ae_1\times Ae_2e_3.
$$
But it doesn't seem like $Ae_2e_3\simeq Ae_2\times Ae_3$.
Edit Would it be fair to say 
$$
\operatorname{Spec}(A)=Z(P_1)\sqcup\cdots\sqcup Z(P_m)\simeq\operatorname{Spec}(Ae_1)\sqcup\cdots\sqcup\operatorname{Spec}(Ae_m)\simeq\operatorname{Spec}(\prod_{i}Ae_i)
$$
so that $A\simeq \prod_i Ae_i$ since $\operatorname{Spec}$ reflects isomorphism as an equivalence of categories?
 A: Let $R$ be a ring whose prime spectrum $X$ is finite and discrete. Then $R$ must be a semilocal ring with maximal ideals $\mathfrak m_1, ... , \mathfrak m_n$, with no prime ideals.  
I think the geometric argument you suggested will work.  I don't know how much algebraic geometry you know, so I'll state the relevant results .  Let $A$ be a commutative ring with identity, and let $Y$ be the space of prime ideals of $A$.  To each open set $U$ of $Y$ is associated a certain ring $\mathcal O_Y(U)$.  In particular, $\mathcal O_Y(\emptyset)$ is the zero ring, and $\mathcal O_Y(Y)$ can be canonically identified with $A$ itself.  To each inclusion of open sets $U \subseteq V$ is associated a certain ring homomorphism $\mathcal O_Y(V) \rightarrow \mathcal O_Y(U)$ denoted by $s \mapsto s|_U$.  If $U_i$ is an open cover of $Y$, then the sequence of abelian groups
$$0 \rightarrow A \rightarrow \prod\limits_i \mathcal O_Y(U_i) \rightarrow \prod\limits_{i,j} \mathcal O_Y(U_i \cap U_j)$$
is exact, where the last map is $(s_i ) \mapsto (s_i|_{U_i \cap U_j} - s_j|_{U_i \cap U_j})$.  In particular, if you have a disjoint open cover $U_i$ of $Y$, then you get an isomorphism of $A$ with the product ring $\prod\limits_i \mathcal O_Y(U_i)$.  Finally, if $\mathfrak p \in Y$, then as you run $U$ over smaller and smaller open neighborhoods of $\mathfrak p$, you can pass to the direct limit of the corresponding rings $\mathcal O_Y(U)$ to obtain a local ring $\mathcal O_{Y,\mathfrak p}$, which is nothing more than $A_{\mathfrak p}$, the localization of $A$ at $\mathfrak p$.
You can apply all this to your situation: $X$ is the disjoint union of $n$ open sets $\{\mathfrak m_i\}$, so the sheaf condition tells you that the restriction maps $R= \mathcal O_X(X) \rightarrow \mathcal O_X(\{\mathfrak m_i\}) = R_{\mathfrak m_i}$ induce an isomorphism of $R$ with $\prod\limits_{i=1}^n R_{\mathfrak m_i}$.  Each $R_{\mathfrak m_i}$ is local with nilpotent nonunits.
Without algebraic geometry, you can still probably argue directly that the map $r \mapsto (r/1, ... , r/1)$ defines an isomorphism
$$R \rightarrow \prod\limits_{i=1}^n R_{\mathfrak m_i}$$
but I can't immediately see a clean proof.  I'll try it again tomorrow.
A: All right, I think I see how to use the direct approach now.  Since $Z(e_i) = Z(P_i)$, then $\sqrt{(e_i)} = \sqrt{P_i} = P_i$.  Since $A$ is Noetherian, then $(e_i) = P_i^{r_i}$ for some $r_i$, and since the ideals $P_i$ are pairwise comaximal, then so are $P_i^{r_i}$ (c.f., exercise 1.13 in Atiyah-MacDonald).  (One can also show this directly: for $i \neq j$ we have
$$
Z((e_i) + (e_j)) = Z(e_i) \cap Z(e_j) = \varnothing
$$
so $(e_i) + (e_j) = 1$.)  We also have
\begin{align*}
\DeclareMathOperator{\Nil}{Nil}
(e_1 \cdots e_m) = \prod_i P_i^{r_i} \subseteq \bigcap_i P_i = \Nil(A)
\end{align*}
which implies that $e_1 \cdots e_m$ is nilpotent.  Then $(e_1 \cdots e_m)^r = 0$ for some $r$, but since each $e_i$ is idempotent, then
$$
0 = e_1^r \cdots e_m^r = e_1 \cdots e_m \, .
$$
Then
\begin{align*}
A \cong \frac{A}{(0)} \cong \frac{A}{(e_1) \cdots (e_m)} \cong \frac{A}{(e_1)} \times \cdots \times \frac{A}{(e_m)} \cong \frac{A}{P_1^{r_1}} \times \cdots \times \frac{A}{P_m^{r_m}}
\end{align*}
by the Chinese Remainder Theorem.  Each factor $A_i := A/P_i^{r_i}$ is local with maximal ideal $P_i/P_i^{r_i}$.
A: I don't yet see how to get the direct approach to work, so here's an answer that uses the theory of Artinian rings. This is basically just Theorem 8.7 in Atiyah-MacDonald, but I'll try to add a little extra exposition.
First note that since $A$ is a finite-dimensional $k$-algebra, then it is Artinian: each ideal is a vector subspace, so the length of a descending chain of ideals is bounded by $\operatorname{dim}_k(A)$.  Now we apply the aforementioned theorem:
Theorem. Every Artinian ring $A$ can be written as a finite direct product of local Artinian rings.
Proof. One can show that every prime ideal is maximal in an Artinian ring and that there are only finitely many maximal ideals (c.f., Prop 8.1 and 8.3 in A-M; Waterhouse has already showed this in your particular case).  Denote these by $\newcommand{\m}{\mathfrak{m}} \m_1, \ldots, \m_n$.  Then
$$
\DeclareMathOperator{\Nil}{Nil}
\newcommand{\p}{\mathfrak{p}}
\Nil(A) = \bigcap_{\substack{\p \trianglelefteq A\\ \text{prime}}} \p = \bigcap_{\substack{\m \trianglelefteq A\\ \text{maximal}}} \m = \bigcap_{i=1}^n \m_i \, .
$$
By Prop. 8.4 the nilradical is nilpotent, so $\Nil(A)^r = 0$ for some $r$, hence
$$
\prod_{i=1}^n \m_i^r \subseteq \bigcap_{i=1}^n \m_i^r = \Nil(A)^r = 0 \, .
$$
Since the ideals $\m_i^r$ are pairwise comaximal, then $A \cong \prod_{i=1}^n A/\m_i^r$ by the Chinese Remainder Theorem.  Each $A/\m_i^r$ is a local Artinian ring with maximal ideal $\m_i/\m_i^r$.  That $\m_i/\m_i^r$ consists of nilpotent elements follows from the fact that prime and maximal ideals coincide, since this implies that the nilradical and Jacobson radical ($=\m_i/\m_i^r$) are equal.
