North Berwick has a particular literary association — Robert Louis Stevenson summered here as a boy in the 1860s and 70s, and the East Lothian coast appears repeatedly in his work.
Treasure Island by Robert Louis Stevenson — the small humped Fidra Island offshore was Stevenson's physical model for the island in the novel. Reading the book in sight of Fidra is one of literature's cleanest geographical pleasures.
Catriona (the sequel to Kidnapped) by Robert Louis Stevenson — opens with David Balfour escaping from imprisonment on the Bass Rock and the action moves through North Berwick. The descriptions of the gannet colony and the cliffs were drawn from Stevenson's own boyhood explorations.
Daemonologie by King James VI — not a novel but a 1597 treatise on witchcraft that grew out of the North Berwick witch trials of 1590. James himself attended the trials in the town and became obsessed with the subject; his book later shaped the Scottish and English witch panics of the 17th century.
Rebus: A Question of Blood by Ian Rankin — part of the Inspector Rebus series, set partly in East Lothian and on the East Coast Main Line through North Berwick. Rankin lives in the area and the local detail is unusually accurate for crime fiction.