Nightmare Fuel is a resource that can be obtained in a variety of ways but the most common ways are from Beardlings and from refining Dark Petals. Dark Petals can be collected from Evil Flowers throughout the world and particularly near Thing locations or Chess Biomes. Alternatively, if you have a good source of Rabbit (or you've pre-caught some), dropping your sanity to just under will cause the Rabbits to turn into Beardlings. Once they have turned, simply kill them for a chance to get Nightmare Fuel (NOTE: This will still increase your naughtiness points).
Nightmare Fuel can be used for quite a few things, not the least of which is to construct a Shadow Manipulator. More importantly however is likely the Divining Rod which can help you find the various things and the exit portal for a world.