According to Chapter 25 of The Adventures of Tom Sawyer,only ghosts “use” blue lights. We are not told why this is so, or why Tom knows that it is so, but it is presented as a true fact.
In Chapter 25, Tom has decided he wants to dig for buried treasure. He tries to get Joe Harper and Ben Rogers to go with him, but he can’t find either of them. He does find Huck Finn, so he and Huck go hunting for treasure. They are talking about where they might dig for the treasure. Tom wants to dig in the haunted house, but Huck is skeptical. He thinks that it is a bad idea because of the ghosts. The two boys argue about ghosts and their behaviors for a while. At one point, Huck tells Tom,
“Well, where you see one of them blue lights flickering around, Tom, you can bet there's a ghost mighty close behind it. It stands to reason. Becuz you know that they don't anybody but ghosts use 'em.”
From this, we see that blue lights are what ghosts use according to Chapter 25 of The Adventures of Tom Sawyer.