Let $X$ be a Hausdorff space such that for each $x \in X$ there is a continuous $f \in C(X)$ with $Z(f)=\lbrace x \rbrace$ (examples are metric spaces, discrete spaces, totally disconnetected spaces). The following statement answers your question for the space $X$:
$Z(I)$ is finite if and only if the following holds:
- There is $A \subseteq X$ closed and $x_1,...,x_m \in X\setminus A$ with $X=A\cup \lbrace x_1,...,x_m\rbrace$.
- $Z(I) = \lbrace A \cup T \mid T \subseteq \lbrace x_1,...,x_m\rbrace\;\rbrace$. In particular $|Z(I)|=2^m$ is a power of $2$.
- $I=(1-\delta_{A \cup T} \mid T \subseteq \lbrace x_1,...,x_m\rbrace)$
Proof: $(\Rightarrow)$ Let $Z(I) = \lbrace Z(f_1),...,Z(f_n)\rbrace$.
First note that $Z(fg)=Z(f)\cup Z(g)$ and $Z(f^2 + g^2) = Z(f) \cap Z(g)$. Hence $Z(I)$ is closed under $\cup, \cap$ and we have $$A := Z(f_1) \cap ... \cap Z(f_n) \in Z(I).$$
Let $A=Z(f_{i_0})$. If $A = X$ then $Z(I)=\lbrace X \rbrace$ and $I=0$. Otherwise choose $x_1 \in X \setminus A$ and $h \in C(X)$ with $Z(h)=\lbrace x_1 \rbrace$. Then $f:= f_{i_0}h \in I$ and $Z(f)=A \cup \lbrace x_1 \rbrace \in Z(I)$. Hence
$A \cup \lbrace x_1 \rbrace = Z(f_{i_1})$ for some $1 \le i_1 \le n$.
Continuing this way, we find $x_1,...,x_k \in X \setminus A$ with $X_j := A \cup \lbrace x_1,...,x_j \rbrace = Z(f_{i_j})$ for $0 \le j \le k$. This procedure can be continued as long as $X_k \varsubsetneqq X$. But since $Z(I)$ is finite, the process must stop, i.e. there is $m$ with $X_m = X$. This shows 1).
To see 2) let $f \in I$. By definition $A \subseteq Z(f)$. Thus $T := Z(f) \setminus A \subseteq \lbrace x_1,...,x_m\rbrace$ and $Z(f)=A \cup T$ is in the RHS. Conversely, if $T = \lbrace x_{p_1},...,x_{p_k}\rbrace$, then choose $h_j \in C(X)$ with $Z(h_j) = \lbrace x_{p_j}\rbrace$. Now $f := f_{i_0}h_1\cdots h_p \in I$ and $Z(f) = A \cup T \in Z(I)$.
- Note that the functions used in the following are continuous because $A$, $\lbrace x_i \rbrace$ are both, open and closed.
Let $f \in I$ and let $X \setminus Z(f) = \lbrace x_{p_1},...,x_{p_k}\rbrace$. Then $f= \sum_j f(x_{p_j})(1-\delta_{X \setminus \lbrace x_{p_j} \rbrace})$ is contained in the RHS. Conversely, let $T \subseteq \lbrace x_1,...,x_m\rbrace$ be given. By 2) there is $f \in I$ with $Z(f) = A \cup T$. Define a continuous map $h$ by $h|Z(f) = 0$, $h(x) = 1/f(x)$ if $x \notin Z(f)$. Then $1-\delta_{A \cup T} = fh \in I$.
$(\Leftarrow)$ If $X$ is given by 1) and $I$ by 3) then $Z(I) = \lbrace A \cup T \mid T \subseteq \lbrace x_1,...,x_m\rbrace\;\rbrace$ follows easily. q.e.d.