The Sages ordained that bedikat ḥametz be performed by candlelight, because candlelight is focused and effective for searching. Therefore, they ordained searching at night, because at night candlelight is more brilliant and does a good job of illuminating holes and crevices, where the essence of the search is carried out. During the day, sunlight makes the candle seem dimmer, so it is hard for the eye to focus on searching cracks and crevices by such weak light (Pesaḥim 8a).
One may not search for ḥametz by torchlight, i.e., with a candle that has two or more separate wicks. This is because the large flame of the torch is liable to start a fire, and the searcher will be preoccupied with making sure nothing catches fire. As a result, he will be unable to concentrate on the bedika. If one mistakenly searched by torchlight, he did not fulfill his obligation. One may not even search by the light of an oil lamp, because the fear of spilling oil and staining his belongings will deter him from maneuvering the lamp into narrow spaces to get a good look at cracks and crevices. Likewise, le-khatḥila one should not use a paraffin candle for bedikat ḥametz, for it, too, is hard to maneuver into narrow spaces, as it can drip and stain his belongings. Therefore, the widespread custom is to prefer wax candles, which barely drip (SA and MB 433:2).
It is technically permissible to use a flashlight for bedikat ḥametz, because the reason the Sages ordained using a candle is its focused light, and the light of a flashlight is also focused. A flashlight even has an advantage in that one need not worry about burning things or spilling wax and oil, and if it is a good flashlight, its light is stronger and more focused than a candle’s. Some people beautify the mitzva and do not search with a flashlight because the Sages derived from Scriptural verses that the search for ḥametz should be performed with a candle (Pesaḥim 7b; see She’arim Metzuyanim Be-halakha 111:4; Yeḥaveh Da’at 1:4; Sidur Pesaḥ Ke-hilkhato 13:10).
In practice, each person may choose how to conduct the bedika – with a candle, as Jews have done for generations, or with a flashlight, whose light is better for the bedika. One may even begin with a candle, in keeping with tradition, and continue with a flashlight, which is better for searching. In places where the searcher is concerned that the candle will cause a fire, or if one does not see well by candlelight, it is preferable to search with a flashlight.