I'll try to explain what is meant by "putting $a = 1$".
You always simulate a finite volume $V = L^D$, where $L$ is usually of the order of a few particle radii. Let's say you choose $L = 10^{-10} \text{ m}.$ You then choose how fine or coarse your lattice will be. For example, you could take $N = 100$ points in $L$, such that $a = L/N = 10^{-12} \text{ m},$ and your lattice sites are at $$x = 0,a,\ldots,(N-1)a = L-a.$$
The process you're looking at will have some (physical) length scale $\xi = \mathcal{O}(L)$. We already introduced $a$ and $L$, so in total we have three length scales. By the Buckingham Pi theorem, only two meaningful dimensionless quantities remain, which can be choosen to be $\xi/a =: \hat{\xi}$ and $L/a =: \hat{L}$, which both are real numbers. All lengths are thus rescaled through $l \mapsto l/a =: \hat{l}.$ This rescaling is known as passing from physical units to (dimensionless) lattice units. Now, the lattice sites are at
$$\hat{x} = 0,1,...,N-1 = \hat{L}-1.$$
In your simulation you find a (dimensionless) value for $\hat{\xi}$, which can be converted back to a physical length $\xi$.
As you've understood above, the parameter $a$ doesn't appear in your program at all; you only need it to define where your lattice sites are, which you scale away by passing to lattice units. Afterwards, you can however always convert dimensionless numbers back to physical lengths.
Another way to look at things: computers only work with dimensionless numbers. You can only feed real (floating point) numbers to your simulation. This rules out explicitly using physical quantities. In a way, simulation some physics means that you've already used the Pi theorem in order to eliminate all dimensionful quantities.