This is a Fusion Furnace. In addition to creating heat and light, it can also be used to charge a droid.
“You ready for some power?” Luke asked Artoo, who was patiently waiting for his own form of nourishment. Luke took a small fusion furnace from an equipment box and ignited it, welcoming even the tiny glow thrown off by the small heating device, then took a power cable and attached it to Artoo through a protuberance that roughly resembled a nose. As power radiated through Artoo’s electronic innards, the stout robot whistled his appreciation.
Star Wars: The Empire Strikes Back - Official Novelisation
and
Luke had retrieved a box of emergency provisions from his X-wing and
set up his camp in a clearing. As he ignited a compact fusion furnace
that he’d placed on a rotten log beside R2-D2, the droid beeped at
him.
“What?” Luke said. “Ready for some power? Okay. Let’s see now.” He ran
a power cable from the furnace to the droid. “Put that in there,” he
said to himself as he plugged the cable into R2-D2’s socket. “There
you go.”
Star Wars: The Empire Strikes Back - Junior Novelisation