The speaker in "The Man He Killed" is someone who has listened to the soldier tell his story, rather than the soldier himself. Thus, the "He" in the title. The speaker is telling the story (in poetic form) that he heard the soldier tell, probably in a bar (implied by the reference to drinking). The speaker hears the story in the same setting the soldier uses for comparison in his story.
The speaker's tone is ironic, and his purpose is to expose the irony and senselessness inherent in warfare. The soldiers doing the actual killing do not kill for grandiose idealistic reasons. They enlist because they need jobs, and they kill because that's what they are ordered to do. Thus, the soldier kills a man he might lend money to or have a drink with if he met under different circumstances. War dehumanizes people. Other men become objects to kill, not people to socialize with.
The speaker uses irony to expose the irony and senselessness of war. Hardy's world is a modern world that makes little sense.