The lights shown were made to look like those of a ship so the target ship would misjudge how close inshore he was. In the novel, they put them on the head of a donkey to mimic bobbing, but I think that fanciful.