So I have the following two problems: Consider a measure preserving dynamical system $(X,\mathcal B, \mu, T)$, i.e. $\mu(A)=\mu(T^{-1}(A))$ for all $A\in\mathcal B$, $T:X\rightarrow$ measurable. Suppose you are given $f:X\rightarrow \mathbb{R}$ measurable.
(1) What can you say about $f$ if $\sum_{n=1}^{\infty}f(T^n(x))$ converges for $\mu$-almost all $x\in X$?
(2) What can you say about $f$ if $\lim_{n\rightarrow\infty}f(T^n(x))$ converges for $\mu$-almost all $x\in X$?
For (1) my conjecture is that $f=0$ $\mu$-a.e, but I am not really sure, I only have a sketch of a proof. We know that $\lim_{n\rightarrow\infty}f(T^n(x))=0$ $\mu$-a.e. By Poincare recurrence theorem, almost every $x\in\{x:f(x)>0\}$ will be recurrent, and the same applies to $x\in\{x:f(x)<0\}$. Since $\lim_{n\rightarrow\infty}f(T^n(x))=0$ $\mu$-a.e. then it must the case that $f=0$ a.e.
For (2) I think that $f$ must be constant on a set of positive measure, unless $T:X\rightarrow X$ is the identity. In this case (2) would hold trivially (so we cannot say anything about $f$). So suppose that $T(x)\neq x$ for every $x\in E$ where $\mu(E)>0$. By contradiction, assume that $f$ is not constant on $E$. Then by Poincare recurrence theorem, almost every $x\in E$ will return to $E$ infinitely many times. Because $T$ is not the identity on $E$ then the sequence will oscillates infinitely many times. Thus $f$ has to be constant on $E$ otherwise it cannot be converging.
Kavi Rama Murthy's answer covers the concerns about the attempt, which is almost good for the first question.
For the second one, observe that if $g\left(x\right)=\lim_{n\rightarrow\infty}f\left(T^n\left(x\right)\right)$, then $g=g\circ T$ almost everywhere. Moreover, we should have the convergence in measure, that is, for each positive $\varepsilon$, $$p_{n,\varepsilon}:=\mu\left\{x\mid \left\lvert f\left(T^n\left(x\right)-g\left(x\right)\right)\right\rvert\gt \varepsilon\right\}\to 0$$ as $n$ goes to infinity. But using invariance of $g$ by $T$, we derive that $p_{n,\varepsilon}=p_{n+1,\varepsilon}$ for each $n$. This proves that $f=g$ almost everywhere, hence that $f$ is almost surely invariant by $T$.