In the future there will be human colonies all over this solar system, on moons of planets and on the planets themselves. There is no doubt there will also be human colonies orbiting planets or in geosync with planets, as well as long term missions in livable large space ships, and whereas, all this may sound like science fiction, it will all come to fruition in the next 50-100 years. The first basic outposts will be sooner.
To keep everyone from going stir crazy, while the volunteers build the more permanent facitilies on the moons and planets, or while in orbit or boldly going where no man has gone before, they will have virtual reality to keep them company. A virtual reality environment that allows them to be anywhere they wish to be, without going anywhere. By this time such technologies will be well evolved and seem so real that while in them it will be hard not to forget where you actually are.
One question will be, how will humans act knowing that they are in a virtual reality environment? Will they engage in unethical behavior, cause crimes, hurt others who are also sharing that virtual reality environment and if so, what laws will there be? Will they be the same as in the real world?
Indeed, there should be some legal thinking prior to the development of these sophisticated VR environments, with the understanding that there might be parts of these laws that have to be scraped otherwise the humans will not accept them or even rebel against them, as humans so often do.
If these folks will be working in an augmented reality while doing tasks needed in the real world, thus helping them with the psychological issues of limited space, confined living quarters or even looking at unappealing environments; such as black moon dust or endless red clay like surfaces and rolling hills with craters; then there must be an understanding of law.
There must also be buy-in and advanced agreement by the colonists, explorers, miners, outpost workers, researchers and operators. They cannot feel trapped, confined or without their perception of freedom. Therefore a set of laws must be in place for proper conduct and criminal law. Think on this.