What is the origin of stargazer?

Stargazer originally had a very derogatory meaning. The word first appears in English in the Geneva Bible, an English translation that appeared between 1557 and 1560. In Isaiah 47:13 in the King James Version, differing only slightly from the earlier Geneva Bible, the text reads “Thou [i.e. the “virgin daughter of Babylon”] art wearied in the multitude of thy counsels. Let now the astrologers, the stargazers, the monthly prognosticators, stand up, and save thee from these things that shall come upon thee.” The text is scornful of idolatrous customs. In Daniel Defoe’s A system of magick (1727), we still see the same contemptuous usage as in the Geneva Bible but somewhat qualified to mean astronomer, “The Eminent Dr. H—— may be call’d the King’s Astronomer, or as the more Eminent Mr. Flamstead usually call’d himself, the King’s Star-gazer.” It is only in the first half of the 19th century that stargazer acquires the benign sense of amateur astronomer, “The mere star-gazer who is an Astronomer simply in the respect that he is the owner of a telescope.” Stargazer in the sense “daydreamer, impractical idealist” first occurs in Emerson’s Transcendentalist, “The materialist..mocks at..star-gazers and dreamers.”