Because brimstone was formerly the common name for sulfur, one would suppose that it was so called because it could be stone taken from the brim, say, of a volcano.
But, no; brim is just the surviving form, in this word, of a dozen ways in which burn was spelled four and five centuries ago.
It was, that is, a “stone” which could “burn.”
“Brimstone and treacle” was a prime household remedy of Dickens’ day, which, to the American grandmother, became “sulfur and molasses.”