A lighter would likely work in space, so long as the lighter contains enough pressurized fuel (as gas), the initiator provides a spark and there is sufficient oxygen content in the environment. This is not true for matches, candles, and old-fashioned liquid-fuel-and-wick lighters though, because they rely on a process called convection to mix the fuel vapor and atmospheric oxygen, and convection relies on gravity (which there is none in space).