I believe that the integers $m$ with $(1+\sqrt{-2})^m$ having real part $\pm 1$ are $0, 1, 2$ and $5$, but I'm having trouble proving it.
Write $$a_m = {\rm Re}((1+\sqrt{-2})^m) = \frac{(1 + \sqrt{-2})^m + (1 - \sqrt{-2})^m}{2} .$$
We have $$a_m = (\sqrt{3})^m\cos(m \cdot \tan^{-1}(\sqrt{2})) ,$$ (which doesn't seem terribly helpful to me), and $a_m$ satisfies the recurrence relation $$a_m = 2a_{m-1} - 3a_{m-2}, \quad a_0 = a_1 = 1.$$
I was hoping that I could show something like $m, (\sqrt{2})^m \leq |a_m| \leq (\sqrt{3})^m$ for large enough $m$, with the lower bounds being guesses based on numerical data, but had no luck.
OEIS lists the sequence here with some other formulas, but they don't seem helpful for what I'm trying to show either.
EEDDIITT: you have all the solutions. Proved in Y. Bugeaud and T.N. Shorey, On the number of solutions of the generalized Ramanujan-Nagell equation, I. Jour. reine angew. Math. vol. 539 (2001) pages 55-74. Preprint is item number 92 at http://www.math.tifr.res.in/~shorey/
Statement found in N. Saradha and Anitha Srivanasan, Genaralized Lebesgue-Ramanujan-Nagell Equations, which I found online as a preprint, but has appeared in a book: Saradha, N.; Srinivasan, Anitha (2008). "Generalized Lebesgue–Ramanujan–Nagell equations". In Saradha, N. Diophantine Equations. Narosa. pp. 207–223.
ORIGINAL: Meanwhile, the governing Diophantine equation $$ 3^m - 1 = 2 y^2 $$ is of Ramanujan Nagell type and has finitely many solutions. Perhaps someone has worked this one out in its entirety.
Let's see, you are asking about when the entry $x = \pm 1$ in $$ \left( \begin{array}{rr} 1 & -2 \\ 1 & 1 \end{array} \right)^m \; \; = \; \; \left( \begin{array}{rr} x & -2y \\ y & x \end{array} \right), $$ with determinant $3^m = x^2 + 2 y^2.$