A children's book (or perhaps Young Adult) by Terry Pratchett. It is written in the style of his Discworld books, and Good Omens. This is the second in the Johnny Maxwell series.
Johnny Maxwell is your average kid, although he has strange adventures and strange friends. This time his strange adventure revolves around the ghosts in the local graveyard. Johnny discovers that he is the only (sane) person in Blackbury who can see -- and talk to -- ghosts. It just so happens that this discovery happens only days after the town has announced that it was selling the graveyard to United Amalgamated Consolidated Holdings, who plan to plow it up and put up office blocks.
Johnny and his friends work to save the graveyard, at first for the sake of the ghosts, but then for the sake of local history. As is always the case in the Johnny books, there are some 'deeper' themes running in the background; "What is our relationship to our history?", "should we give up on the past in the name of the future?", and (maybe) "what is death?", although Terry Pratchett doesn't seem to be seriously trying to answer that last one. Fortunately, these questions don't get in the way of the story, or the humour.
A very good book, and any Pratchett fan should read it (along with the rest of the Johnny Maxwell Trilogy), no matter what their age; however, it is most likely aimed at the 10-15 year old demographic.
Published by Doubleday in 1993 (Hardcover), and Corgi in 1994 (Paperback).
The Johnny Maxwell trilogy starts with Only You Can Save Mankind, and finishes with Johnny and the Bomb.