It is useful to recall the very definitions of the rings in question.
$\mathbb Z[i]$ is by definition the smallest subring of $\mathbb C$ that contains $\mathbb Z$ and also $i$. Its elements are all obtainable by finitely many ring operations, i.e., adding, subtracting, multiplying of integers and/or $i$. Likewise the ring $\mathbb Z[x]$ has a similar property: All elements are obtainable from integers and $x$ in finitely many steps via adding, subtracting, multiplying. Moreover, $\mathbb Z[x]$ has by definition the univresal property that for any ring $R$, element $r\in R$, ring homomrphism $\phi\colon \mathbb Z\to R$, there exists a unique homomorphism $\Phi\colon\mathbb Z[x]\to R$ such that $\Phi|_{\mathbb Z}=\phi$ and $\Phi(x)=r$.
To construct $\Phi\colon\mathbb Z[x]\to\mathbb Z[i]$ such that $\Phi$ is onto it is therefore quite natural to consider as $\phi\colon\mathbb Z\to\mathbb Z[i]$ the embedding and to pick $i$ as image of $x$. Then let $I$ be the kernel of $\Phi$. Per isomorphism theorem, $\mathbb Z[x]/I$ is isomorphic to the image of $\Phi$. As our choice guaranteed surjectivity, we conclude $\mathbb Z[x]/I\cong \mathbb Z[i]$ as desired.