You would need several adaptations working together to allow an organism to emit lightning, specifically you would need organs to generate power, store power, ground the creature, generate a large voltage differential to overcome the air resistance, and generate an ion stream to point the lightning somewhat and also lower the air resistance further.
First power generation, this can be done with basically the same organs the electric eel uses except optimized to produce continuous power vs brief bursts.
Power storage could be accomplished by essentially creating a large capacity capacitor using layers of thin wide scales with a highly conductive core and highly resistive coating. Every other scale would be connected to one electrical circuit system which would accumulate a positive charge while the other scales would be connected to a circuit system that would accumulate a negative charge. The scale capacitor organ would, of course, be charged with the power generation organs.
The grounding organ would consist of the positively charged circuit system connected to the creature's feet which would be designed to maximize the conductivity of anything it touches by excreting a highly conductive mucus over a large padded area and onto it conductive claws.
Next comes the lightning generating tentacles. The skin of the tentacles would be a spiral of cells, conductive on the inside and insulative on the outside. When a large dc current is passed through the skin of the tentacles, again generated by the power generation organs, they would act like a giant spark plug and would quickly begin to store energy in the magnetic field around the long coil of tentacle skin cells.
The final organ would be at the tip of the tentacle and would form essentially an organic cathode-ray tube. 671
Two conductive plates, one near the tip with a hole in the center would be positively charged, while the other plate further back from the tip would be negatively charged. Electrons would flow from the negative plate to the positive plate with some leaving as a stream through the hole in the plate near the tip. The stream of electrons would serve to lower the resistance of the air in their direction of travel allowing some level of aiming the lightning once generated.
Now to put this all together the creature would ground its self with its feet, begin charging its capacitor scales and once sufficient power is stored switch to generating a dc current through its sparkplug like tentacle skin and point its cathode-ray like tentacle tip organ at the enemy. Then a quick chemical dump in a switching portion of the tentacle skin would break the circuit. The counter electromotive force caused by the magnetic field in the tentacle skin collapsing would cause a massive voltage spike overcoming the air resistance along the least resistive path... hopefully in the direction of the ion stream coming from the tip of the tentacle towards the enemy and all the power stored in the capacitor scales would dump into the target in a flash of lightning. 75