This is a myth, using a pencil in space isn't clever or thrifty, it's a disaster waiting to happen. The graphite from pencils breaks off in small fragments while writing and the fragments can create shorts in electronics and to top it off they're also flammable. None of those are properties you want to bring into a spacecraft.
I wonder how graphite can create shorts, when all electronics board and components on them can be easily covered with protective nonconducting PCB varnish.
dumb question but how well do sharpies work in space? the ink diffuses through the felt tip - that doesn't require gravity. wouldn't that work pretty well?
also crayons seem like a better bet than pencils - they're still flammable and prone to flaking but at least they're not conductive.
Your question piqued my curiosity, so I did some googling... Apparently sharpies do work in space, though NASA seems to prefer the Duro brand of marker.
Sharpies and markers generally run out waaay quicker than pens or pencils. They also dry out if you're not careful, and dry out temporarily if you use them for more than a few minutes at a time.
Crayons just aren't dark enough, and are too wide. Accurately reading numbers and symbols written in crayon at a normal handwritten size is not something I want to do. Not to mention the constant sharpening.
After Fisher, the pen company, spent their own couple millions to develop a pen that could write in zero gravity, they convinced NASA to use it, and a few years later the Soviets bought 100 of them for their own space program.
NASA was never involved in the development of the space pen, though they supposedly had their own effort that was quickly abandoned as it got expensive. Before that they also used pencils.
The pen is just a better writing implement in space. It cost $3 in the 60s, with wide availability.