Example 6 Find all positive integer solutions of the equation $3^{x}-5^{y}=z^{2}$. ${ }^{[5]}$
(2009, Balkan Mathematical Olympiad)
Solving modulo 2 gives $0 \equiv z^{2}(\bmod 2)$, so $2 \mid z$. Solving modulo 4 gives $(-1)^{x}-1=0(\bmod 4)$, so $2 \mid x$. Let $x=2 x_{1}$. Then $\left(3^{x_{1}}+z\right)\left(3^{x_{1}}-z\right)=5^{y}$. Let $\left\{\begin{array}{l}3^{x_{1}}+z=5^{\alpha}, \\ 3^{x_{1}}-z=5^{\beta},\end{array}\right.$ where $\alpha+\beta=y$, and $\alpha>\beta$. Eliminating $z$ gives $2 \times 3^{x_{1}}=5^{\beta}\left(5^{\alpha-\beta}+1\right)$.
Therefore, $\beta=0$.
Thus, $\alpha=y$.
(1) If $x_{1}=1$, then $5^{y}+1=6$, i.e., $y=1, x=2, z=2$.
(2) If $x_{1}>1$, then solving modulo 9 gives
$$
\begin{array}{l}
5^{y}+1 \equiv 0(\bmod 9) \Rightarrow 5^{y} \equiv-1(\bmod 9) \\
\Rightarrow y \equiv 3(\bmod 6) . \\
\text { Let } y=6 y_{1}+3 . \text { Then } \\
5^{6 y_{1}+3}+1=2 \times 3^{x_{1}}
\end{array}
$$

It contains the factor $5^{3}+1=2 \times 3^{2} \times 7$, which is a contradiction.
In conclusion, the positive integer solution to the original equation is
$$
(x, y, z)=(2,1,2) \text {. }
$$