At Mental Floss, Jake Rosen asks: "Who Has Jurisdiction for Crimes Committed in Space?"
In most cases, space crime sprees would be treated the same as if an offender was traveling in a foreign country or in international waters. If you're a U.S. citizen and decide to bludgeon someone at sea or on the Moon, the various international agreements and national laws would determine how you get prosecuted. (Assuming, of course, you returned to Earth to answer the charges.)
Space crimes pose another intriguing wrinkle. In terra firma investigations, authorities can secure crime scenes, question witnesses, and preserve evidence. Aboard a spaceship or on a distant planet, these procedures would be difficult to perform, and almost impossible to do in a timely fashion. Even if a criminal investigator is on Mars, low gravity will affect blood spatter and bodies may even decay at a different rate than they do on Earth. While an American may be found liable for murder, proving it was malicious and not the result of the dangerous environment would give any prosecutor a headache. A defense attorney, on the other hand, would have a field day questioning defective spacesuits or toxic exposure to strange space chemicals.
Then again, prosecutors may not have to concern themselves with evidence. Thanks to airlocks and restrictive suits, the movement of space travelers is highly monitored. It would be hard to make any plausible deniability about one's whereabouts.