Let $\mu$ be the common law of the $Y_e$. I call $(\Omega,\mathcal F,\mathbb P)$ the underlying probability space: $\Omega = \mathbb R^{\mathbb Z^2}$, $\mathcal F = \mathcal B(\mathbb R)^{\otimes\mathbb Z^2}$, $\mathbb P$ is the image of $\mu^{\otimes\text{edges}}$ under the application that maps the $Y_e$ to the $X_i$. Let $S$ be the set of events depending only on a finite number of $X_i$'s. Set $$\mathcal A:=\{A\in\mathcal F\text{ such that }\inf_{B\in S}\mathbb P(A\Delta B)=0\}.$$ Note that the quantity(In what follows, what we will be interested in the infimum is nothing butthat $|\mathbb P(A)-\mathbb P(B)|$, so one might use one or the other as one pleases$|\mathbb P(A)-\mathbb P(B)|\leq\mathbb P(A\Delta B)$.) It is not hard to prove that $\mathcal A$ is a $\sigma$-algebra, once you've realised that $$\big(\bigcup_nA_n\big)\Delta\big(\bigcup_nB_n\big)\subset\bigcup_n(A_n\Delta B_n);$$ in particular, $\mathcal A$ is in fact just $\mathcal F$.
Now let $A\in\mathcal F$ such that $T_i^{-1}A=A$ for any $i\in\mathbb Z^2$. For $\varepsilon>0$, I can choose $A_\varepsilon$ such that $\mathbb P(A\Delta A_\varepsilon)\leq\varepsilon$ and $A_\varepsilon$ depends only on a finite number of $Y_e$, say only those contained in a ball of radius $N_\varepsilon$. Because $(C\cap D)\Delta(C'\cap D')\subset (C\Delta C')\cup (D\Delta D')$, we have $$\begin{align*}|\mathbb P(A)^2-\mathbb P(A)| & = |\mathbb P(A)\mathbb P(T^{-1}_iA)-\mathbb P(A\cap T^{-1}_iA)| \\ & \leq |\mathbb P(A_\varepsilon)\mathbb P(T^{-1}_iA_\varepsilon)-\mathbb P(A_\varepsilon\cap T^{-1}_iA_\varepsilon)| + 4\varepsilon,\end{align*}$$ and the first term is zero provided $|i|>2N_\varepsilon$. This implies $\mathbb P(A)^2=\mathbb P(A)$, hence $\mathbb P(A)\in\{0;1\}$.
(It is a classical argument, although I don't remember seeing it outside a probability lesson.)