Depending on visibility and size of the target, it can be as much as 10 miles or more. Or as low as 300 yards if the weather is really cruddy at night. One thing helps, when starting a career I go thru the seamen available (doesn't cost any renown to recruit a seaman 3rd) to take the pick of the litter - if someone has 35-40 watchman I grab him and stick him in one of the damage control slots. Then I go thru the deck watch and send all the lubbers with watchman skill less than 30 back to bootcamp, unless they have a high skill in something else I need. Often it's a random assignment, I find a guy on the bridge watch with 20 watchman skill but 50 mechanical and 50 guns, reassign him to one of the empty torpedo room slots instead of making him walk the plank.
Start with a good bridge watch, nobody under 35 watchman skill when starting a career, and there will be fewer surprise parties.