In the first paragraph of the story, the narrator refers to the "Federal army" and describes a captain and two privates, both of which are ranks within an army. Federal army is another way of saying Union army, and the Union army referred to the United States army—the army of the union of the states—or the North (as the South was attempting to secede from the union). The only time in American history that the North and South fought against one another was during the Civil War, and so a reference to the Federal army is one detail that helps to establish this as the setting.
When the narrator describes the man who is about to be hanged, he is called a "civilian" (as opposed to someone who is in the military), and he is described as a "planter," someone who owns a plantation. Since the narrator has already mentioned that the story is set in Alabama, we can assume that this man is also a slave owner. This is another important detail that helps us to understand that the story is set sometime during the American Civil War, which took place from 1861 to 1865.