I don't know but the 1911 Encyclopedia Britannica says
The slang use of "beak" for a magistrate or justice of the peace has not been satisfactorily explained. The earlier meaning, which lasted down to the beginning of the 19th century, was "watchman" or "constable." According to Slang and its Analogues (J. S. Farmer and W. E. Henley, 1890), the first example of its later use is in the name of "the Blind Beak," which was given to Henry Fielding's half-brother, Sir John Fielding (about 1750). Thomas Harman, in his book on vagrants, Caveat or Warening for commen cursitors, Vulgarely called Vagabones, 1573, explains harmans beck as "counstable," harman being the word for the stocks. Attempts have been made to connect "beak" in this connexion with the Old English beag, a gold torque or collar, worn as a symbol of authority, but this could only be plausible on the assumption that "magistrate" was the earlier significance of the word.
Businessballs has a longer entry on the subject.