Torches Were Not Widely Used
A stone passageway lined with torches is one of the most typical pictures of a medieval castle that most people have in their minds thanks to pop culture. You grasp hold of one and move through the dimly lit areas at night. The trouble about torches as a light source is that it is not viable for any realistic, long-term applications. It doesn't make logical that flaming torches would be mounted in sconces on castle walls.
You could anticipate that a torch would burn for anything between 20 minutes and two hours, depending on how it was created. To burn for more than an hour, a long torch would need to be submerged in tar or pitch, which would emit toxic fumes and dense smoke. This would be unsafe and impractical in a fortress with walls lined in them. It would be absurd to maintain the flame of a short-burning torch. Although they may be ready to burn as needed, it made little sense to have them lighted solely for ambient illumination.
Candles or lamps would provide most of the lighting in castles. They burned more safely and more thoroughly. Candle production would likely be less expensive and take less time than torch production, for example.