Fix $d \geq 1$ and let $E(\mathbb{Z}^d)$ denote the set of all edges of the graph $\mathbb{Z}^d$. Let us consider a measure preserving system $(\mathbb{R}^{E(\mathbb{Z}^d)}, B^{E(\mathbb{Z}^d)}_\mathbb{R}, \mu, T)$ where $\mu$ is the product measure that makes the coordinate maps $X_{e'} ((\omega_e)_{e\in E(\mathbb{Z}^d)}) := \omega_{e'}$ i.i.d. random variables and $T((\omega_e)_{e \in E(\mathbb{Z}^d)} = (\omega_{e+})_{e \in E(\mathbb{Z}^d)}$ , where $e = (x, y)$ then $e_+ = (x + (1, 0, . . . , 0), y + (1, 0, . . . , 0))$ be the edge which can be obtained by translating the endpoints of $e (x \ \text{and} \ y)$ by unit length in the first coordinate direction. Show that $T$ is ergodic.
[ Hint: It is enough to show that if $A$ is invariant, then $P(A) = P(A)^2$. Now any set $A \in B^{E(\mathbb{Z}^d)}_\mathbb{R})$ can be approximated by some cylinder set $B \in \sigma(X_e : e \in K)$ where $K$ is a finite subset of edges. Note that $B$ and $T^{−n}(B)$ are independent for sufficiently large $n$.]
I understand that the idea here is to show that for an invariant set $A$, $P(A) = 0 \ \text{or} \ 1$ but am not able to connect to the hint to solve it.
Hint: Show that for any two cylinder sets $A$ and $B$ we have $\mu(T^{-n}A\cap B)=\mu(A)\mu(B)$ for any sufficiently large $n$. This readily implies that $\mu$ is ergodic.
Added later: As you say yourself, $B$ and $T^{-n}B$ are "independent" for $n$ sufficient large. This is a particular case of what I suggested above when $A=B$, that is, $$\mu(T^{-n}B\cap B)=\mu(B)^2.$$ Now, if $T^{-1}B=B$, then this identity gives $\mu(B)=\mu(B)^2,$ that is, $$\mu(B)(\mu(B)-1)=0$$ and so either $\mu(B)=0$ or $\mu(B)=1$.