Things are more advanced than they appear
It’s important to note that the inhabitants of Tuanul are not actually living in low-tech conditions. Lor San Tekka’s hut, for example, contains various types of advanced technology:
Like most of the buildings in Tuanul, the residence toward which he
was speeding was an odd amalgamation of the contemporary and the very
primitive. Dwellings on many of the minor desert worlds were like
that: designs dictated by necessity as well as the environment. Though
BB-8’s intended destination resembled little more than a primeval hut,
it contained electronics and multiple concealed enhancements capable
of making living in a harsh, dry climate more than merely tolerable.
The Force Awakens
Indeed, the inhabitants of the village appear to restore machines for a living:
In addition to its motley group of mixed galactic peoples, Tuanul was
home to an assortment of used but still valuable machinery. A fair
portion of the village population eked out a modest living modifying
and restoring such equipment for resale in larger towns and cities.
The Force Awakens
So it’s not just Lor San Tekka who seems likely to have access to power cells and so forth.
In other words, the fire and “primeval hut” are more aesthetic limitations than technological ones. We see this a lot in Star Wars. For example, the Gungans are often dismissed by the Naboo as primitive, but have sophisticated technology (including some they make themselves) and a standing army that uses fairly advanced military tactics. Not every culture adopts the technological aesthetic of Coruscant or Mandalore.
There are various reasons for this, but it probably just comes down to a cultural preference for lower-tech surroundings.
The villagers of Tuanal follow an aescetic lifestyle, rejecting the
comforts and luxuries of the galaxy. Even in matters of defense, the
villagers prefer to create their own weapons rather than line the
coffers of weapons manufacturers.
The Force Awakens Visual Dictionary
So there we have it: like many real-life religious groups, it’s not technology that the villagers object to: it’s luxury. Thus they can work by candlelight while still using blaster pistols such as this one: