Let's start from the basic physical reasoning. The idea is that we want to find the general form of the wavefunction that has the symmetry of the problem. Let's say that we have a one-dimensional lattice with lattice spacing $a$. So, a wavefunction that shares the symmetry of the lattice would be invariant under translations by $na$ where $n\in\mathbb{Z}$.
This means that if the state is $|\psi\rangle$ then $\langle x+na | \psi\rangle=e^{i\phi_n}\langle x|\psi\rangle$ where $\phi_n$ is some phase. Similarly, for some $m\in\mathbb{Z}$, $\langle x+ma | \psi\rangle=e^{i\phi_m}\langle x|\psi\rangle$. Thus, $\langle x+ma | \psi\rangle=e^{i(\phi_m-\phi_n)}\langle x+na|\psi\rangle$. But, we also must have $\langle x+ma | \psi\rangle=e^{i\phi_{m-n}}\langle x+na|\psi\rangle$. Thus, we conclude that $\phi_{m-n}=\phi_m-\phi_n$. This can only hold true for generic $m,n$ if $\phi_n=Kn$.
Thus, $\langle x+na|\psi\rangle=e^{iKn}\langle x|\psi\rangle$.
So, we have a class of states indexed by the parameter $K$. In particular, we can write $$|\psi_K\rangle=\int dx |x\rangle\langle x|\psi_K\rangle=\sum_n\int_{na}^{(n+1)a} dx|x\rangle\langle x|\psi_K\rangle$$$$=\sum_n e^{iKn}\int _0^adx|x+na\rangle\langle x|\psi_K\rangle=\sum_ne^{iKn}|n\rangle$$ where we have defined $|n\rangle=\int _0^adx|x+na\rangle\langle x|\psi_K\rangle$.