If they did travel at night, was that limited to cargo only, or did passenger trains travel by night as well? Did they use oil lamps in the compartments? Was there a high risk of fires?
The light bulb is hardly the only source of light.
Early trains that operated at night used candles enclosed in large housings that had reflectors and lenses to project the light forward. In the second half of the 19C trains switched over to oil burning lamps, typically using kerosene.
There was a second type of flame based lantern, the "carbide lamp". When water drips on calcium carbide it gives off acetylene gas which is burned to produce light. This type of light was also used in early automobiles (e.g. 1915 Model T) and on bicycle headlights up until the 50s, and for miners and cavers.
Around 1880 Charles Brush developed the arc lamp which is basically an electrical arc between a pair of carbon electrodes. It sometimes required adjustment of the spacing between them as the carbon gradually wore down. It was very bright, and locomotives equipped with arc were required to add shutters so that they could dim their lights for oncoming trains.
Although Edison developed the incandescent lamp at about the same time, these used a carbon filament which was fragile and not well suited to the vibration of a locomotive. It wasn't until 1911 that the tungsten filament came out.
Adoption of the light bulb was not immediate by any stretch. According to a 1915 Santa Fe Magazine article, lighting broke down as:
In 1915 there are 67,869 locomotive headlights in use.
42,213 are oil.
2,904 are acetylene.
22,120 are electric arc.
632 are incandescent.