[guided]The only subtle point is that the definition of independence is stated for intersections of the events $A_i$, while the event $E_S$ also contains complements $A_j^c$. We therefore prove explicitly that independence is preserved under replacing some of the events by their complements.
Let $S,T\subseteq I$ be disjoint, and define
\begin{align*}
E_{S,T}:=\left(\bigcap_{i\in S}A_i\right)\cap\left(\bigcap_{j\in T}A_j^c\right).
\end{align*}
We prove by induction on the number $|T|$ of complements that
\begin{align*}
\mathbb P(E_{S,T})=p^{|S|}(1-p)^{|T|}.
\end{align*}
We use the standard conventions that an empty intersection is $\Omega$ and an empty product is $1$; these conventions are needed when $S=\varnothing$ or $T=\varnothing$.
When $|T|=0$, there are no complements, so
\begin{align*}
E_{S,T}=\bigcap_{i\in S}A_i.
\end{align*}
Since $A_1,\ldots,A_n$ are independent and $\mathbb P(A_i)=p$ for every $i\in I$, the definition of independence gives
\begin{align*}
\mathbb P(E_{S,T})=\prod_{i\in S}\mathbb P(A_i)=p^{|S|}.
\end{align*}
This is the desired formula in the base case.
Now suppose the formula has been proved whenever $|T|=r$, and let $T$ have size $r+1$. Choose one complement index $j_0\in T$, and set $T_0:=T\setminus\{j_0\}$. The event $E_{S,T}$ is the part of $E_{S,T_0}$ where $A_{j_0}$ does not occur. Equivalently,
\begin{align*}
E_{S,T}=E_{S,T_0}\setminus E_{S\cup\{j_0\},T_0}.
\end{align*}
The event $E_{S\cup\{j_0\},T_0}$ is contained in $E_{S,T_0}$, because it imposes all the requirements of $E_{S,T_0}$ and also requires $A_{j_0}$. Hence finite additivity of the [probability measure](/page/Probability%20Measure) gives
\begin{align*}
\mathbb P(E_{S,T})=\mathbb P(E_{S,T_0})-\mathbb P(E_{S\cup\{j_0\},T_0}).
\end{align*}
Both terms on the right now have only $r$ complement indices, and the required disjointness conditions still hold. Indeed, $S\cap T_0=\varnothing$ because $T_0\subseteq T$ and $S\cap T=\varnothing$, while $(S\cup\{j_0\})\cap T_0=\varnothing$ because also $j_0\notin T_0$. Therefore the induction hypothesis applies to $(S,T_0)$ and $(S\cup\{j_0\},T_0)$:
\begin{align*}
\mathbb P(E_{S,T})=p^{|S|}(1-p)^r-p^{|S|+1}(1-p)^r.
\end{align*}
Factoring gives
\begin{align*}
\mathbb P(E_{S,T})=p^{|S|}(1-p)^r(1-p)=p^{|S|}(1-p)^{r+1}.
\end{align*}
This completes the induction. Finally, for a fixed occurrence set $S\subseteq I$, taking $T=I\setminus S$ gives
\begin{align*}
\mathbb P(E_S)=p^{|S|}(1-p)^{n-|S|}.
\end{align*}[/guided]