The Christmas lore that bad children will get a lump of coal in their stocking instead of presents actually has several possible origins. The difference between each origin story is cultural, varying between countries. Like most cultural rivalries, the answer to "who did it first" is buried in generations of storytelling, but it's fun to consider all of the possibilities behind the legend.
One of the many origin stories begins in Italy where they believe in La Befana (a witch who delivers presents) instead of Santa Claus. When Jesus was born, La Befana saw a bright star in the sky and gathered some toys and other presents to give to the baby Jesus, but she couldn't find the stable. Every year she goes around looking for Jesus and leaves toys for good children, and coal for bad ones. These days, Italians use a candy, called Carbone Dolce, to turn the legend into a joke. The dark, rock-like candy looks exactly like lumps of coal.
Some people say that the lumps of coal story started in Holland in the 16th century. Before Christmas, children would put their clogs by the fireplace before stockings were used. When a child was bad they got a lump of coal, but if they were good they got a small toy, cookies or candy.
In the 19th century, most of Europe was powered by coal, and most household furnaces were coal burning. A pan of hot coals would often be kept under the bed to generate heat in the middle of the night. In England, while the children of rich families got candy and toys in their stockings, those who were poor (believed to have been made poor by God, as punishment for their family's bad deeds) would get coal, if they were lucky.
A proud but poor nobleman had three daughters ready to marry. The problem was, he had no dowry to give them. Saint Nicholas secretly gave the family enough money so their daughters could start their lives out with their new husbands. He did this by placing the money in some stockings that were drying by the fireplace. When word spread about this miracle, everyone started hanging their stockings by the fire in hopes that the secret benefactor would visit them. He did visit those houses, but for those who Saint Nicholas knew to be bad, he left them with a lump of coal instead of gold.