It has been used since the 1850s as a symbol to warn people of a poisonous substance. Previously a variety of motifs had been used, including the Danish + + + and symbols of skeletons. In 1829 New York State required the labeling of all containers of poisonous substances.
In the 1870s Americans began using bright cobalt blue bottles with a variety of raised bumps and designs to indicate poison, but it was not until the 1880s that the skull and cross bones became ubiquitous, and the brightly coloured bottles were phased out.
Today, the skull and crossbones is primarily used for poison, but is less common outside industrial usage than it once was.
See Jolly Roger for the use of the Skull and crossbones as a pirate symbol.