Assume we have a $n\times n$ matrix, where $n$ is odd. The elements in this matrix are either $0$ or $1$. We can change the values of the elements in the matrix as follows: changing the value of position $\{i,j\}$ from $0$ to $1$ or vice versa also changes the values in positions $\{i-1,j\}$,$\{i+1,j\}$,$\{i,j-1\}$ and $\{i,j+1\}$ respectively. If any of these falls outside the matrix, we ignore it. Call these the basic operations.
For example, if $n = 3$ and the matrix is all zeroes, changing the value of $\{1,2\}$ would result in $$ \left( \begin{array}{ccc} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{array} \right) $$ and so on.
We can turn the matrixes into vectors so that position $\{i,j\}$ of the matrix is the element $(i-1)n+j$ of the vector. The above example is thus the same as adding vector {1,1,1,0,1,0,0,0,0} to zero vector of length $9$. The addition is done modulo $2$.
These vectors are elements of a $n^2$-dimensional vector space over the elementary abelian field of order $2$. The vectors associated with the basic operations form a basis of some subspace of this vector space.
If we look at the set of these vectors when $n=3$, we have the following, written as matrix: $$\left( \begin{array}{ccccccccc} 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 & 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 \\ \end{array} \right)$$ These vectors are linearly independent and there are $9$ of them and thus form a basis of the whole space. This means that we can reach any configuration of zeroes and ones in the matrix by basic operations.
What if $n=5$? We have, again, a set of $25$ vectors associated with the basic operations, very similar to the case $n=3$: $$\left( \begin{array}{ccccccccccccccccccccccccc} 1 & 1 & 0 & 0 & 0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 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 & 1 \\ \end{array} \right)$$
However, thse vectors are not linearly independent and thus do not form a basis of the whole space. In fact, they span a subspace of dimension $23$. This can be interpreted so that we can reach any configuration of zeroes and ones using basic operations, apart from two positions which are out of our control and may or may not have the desired values.
If $n=7$, the set of vectors associated with the basic operations are again linearly independent. If $n=9$ or $n=11$, the vectors are not linearly independent, but are again independent if $n=13$.
The question is why in the case of $n=3$ or $n=7$ we can reach all possible configurations of zeroes and ones in the matrix with the basic operations but not in the case of $n=5$. And further, for which values of $n$ are the vectors associated with the basic operations linearly independent?
Testing some values of $n$, the list of such values of $n$ begins as $$\{1,3,7,13,15,21,25,27,31,37,43\}.$$ Looking the list up in OEIS returns only one result: A209839, which seems to have very little to do with this problem.
There is really no reason to restrict ourselves with odd $n$s. For general $n$, the values for $n$ that produce vectors that span the whole space begins $\{1,2,3,6,7,8,10,12,13,15,18,20,21,22,25\}.$ This is sequence A076436 at OEIS.
Edit: I had made an error in my program which resulted in wrong sequence and wrong dimensions of the subspaces. I have fixed that now. See comments for the correct differences in dimensions.
Let me reformulate the problem to get an interesting description of which board sizes have unique Lights Out solutions. Let $A_n$ be the adjacency matrix for the path graph $P_n$. Then instead of $n^2$-dimensional vectors, we will simply represent configurations by $n\times n$ matrices over $\mathbb{F}_2$. Now, to determine for what $n$ we have a unique solution, we will look at solutions to the zero configuration.
If $X$ is an $n\times n$ matrix representing a set of moves, then $A_nX$ represents the result from applying vertical adjacencies. And $XA_n$ represents the resulting configuration from applying horizontal adjacencies. And so, $X$ is a solution to the zero configuration iff: $$A_nX+XA_n+X=0$$
which we may simplify to $$A_nX+X(A_n+I_n)=0$$
This looks like the Sylvester Equation $AX+XB=0$ where $B=A+I$. It is a well known result that the Sylvester Equation has unique solutions iff the characteristic polynomials of $A$ and $B$ are relatively prime. This result applies to all fields, including $\mathbb{F}_2$. So your question has been transformed to "For what $n$ do the characteristic polynomials of $A_n$ and $A_n+I_n$ share a common factor?"
It is not hard to prove inductively that the characteristic polynomial $p_n(\lambda)$ of $A_n$ satisfies the recurrence relation:
\begin{align*} p_0(\lambda)&=1\\ p_1(\lambda)&=\lambda\\ p_n(\lambda)&=\lambda p_{n-1}(\lambda)+p_{n-2}(\lambda)\ \end{align*}
Then we have the following result about the characteristic polynomials $p_n^+(\lambda)$ of $A_n+I_n$:
$$p_n^+(\lambda)=\det(A_n+I_n+\lambda I_n)=\det(A_n+I_n(\lambda+1))=p_n(\lambda+1)$$
therefore an $n\times n$ Lights Out board has unique solutions iff $p_n(\lambda)$ and $p_n(\lambda+1)$ are relatively prime.
But wait, there's more!
The recurrence relation for $p_n(\lambda)$ is exactly what defines Fibonacci polynomials $f_{n}(\lambda)$ over $\mathbb{F}_2$ except that the initial conditions are shifted once. That is, $p_n(\lambda)=f_{n+1}(\lambda)$. Now, there are some very useful properties of Fibonacci polynomials over $\mathbb{F}_2$, and a particularly useful one in our case is that for all $n$, $$f_{2n}(\lambda)=\lambda (f_n(\lambda))^2$$
What does this mean for your problem, you might ask? Well, it is easy to see that $$p_{2n+1}(\lambda)=\lambda (p_n(\lambda))^2$$ and $$p_{2n+1}(\lambda+1)=(\lambda+1)(p_n(\lambda))^2$$
so let's suppose that for a certain $n$, $p_n(\lambda)$ and $p_n(\lambda+1)$ are relatively prime. Suppose also that $(\lambda+1)\nmid p_n(\lambda)$. Then $p_{2n+1}(\lambda)$ and $p_{2n+1}(\lambda+1)$ are relatively prime. Repeating this, we see that for all $k$, $p_{(n+1)2^k-1}(\lambda)$ and $p_{(n+1)2^k-1}(\lambda+1)$ are relatively prime.
This means that if an $n\times n$ Lights Out board has unique solutions, and $(\lambda+1)\nmid p_n(\lambda)$, then every board of size $(n+1)2^k-1\times (n+1)2^k-1$ also has unique solutions.
If we try to search for some $n$ that satisfy this requirement, we get a few values $0,6,10,12$ (these are just a few examples). So every number of the form $2^k-1$, $7(2^k)-1$, $11(2^k)-1$, and $13(2^k)-1$ will appear in A076436.
Hopefully this gives you a good intuition for your problem. Most of this answer is based on the following paper, which you may want to read for more details:
$\sigma$-game, $\sigma^+$-game, and two-dimensional additive cellular automata