Having listened to the audio commentary for the episode and David A. Goodman's own synopsis for Federation: The First 150 Years, I think we can conclude that this is something that has been left intentionally vague. The conceit seems to be that he was captured when he was off the Enterprise, but beyond that there's no mention of how this occurred.
Jonathan Archer had several run-ins with Klingons, but the most serious was his intervention to help the Arin'Sen. They were a subject species of the Empire, and Archer succeeded in helping a ship of Arin'Sen refugees escape a Klingon ship's pursuit. Archer was eventually captured for this "crime," tried on the Klingon colony of Narendra III, and sentenced to life imprisonment on the penal asteroid Rura Penthe. He escaped, but the Klingons responded by putting a bounty on him, which technically was never lifted throughout his life.
Federation: The First 150 Years
"As I was breaking the story I thought that this [the initial scene
with Archer and Phlox] was a great way to get the exposition out that
Archer had been captured and taken by the Klingons and that that
Enterprise was there for the trial"
Audio Commentary - Judgement with David A. Goodman