I'm an electrical engineer, and the answer is ... it's complicated.
Electrical damage depends on voltage applied, external resistance, internal resistance, and path through the body. If the current goes through an electrically sensitive part of the body, like the heart or brain, then it takes a lot less to hurt you then otherwise.
Assuming you miss a critical area, electrical damage is essentially a burn on the inside of your body. To judge the severity of the injury you'd want to look at the amount of energy per volume affected then look at how much tissue is subjected to enough energy to kill it. Energy per volume would be internal resistance * (voltage applied / (internal resistance + external resistance)) ^ 2 * time applied / volume of current path. That involves a bunch of simplifications and from there it just gets more complicated.
Since this is D&D though, a back of the envelope calculation might be more appropriate. According to a taser site, it take 10-50 Joules of energy to cause a heart attack. According to wikipedia a lightning bolt has a electrical field gradient of about 1 MV/m, a typical duration of 30 us. Typical width of a human body would be 20 cm. The equation to solve is 50 = 1e6 * .2 * I * 30e-6, where I is the current. This gives 8.3 Amps as a lethal current, which seems reasonable, keeping in mind that this is a very short duration. Assuming that a normal human male has 6 hp, this gives about 1.4 Amps per hit point.
Going the other way, 5d6 damage averages to 17 hp, which gives 23.8 Amps. Using the same lightning estimate, energy = 23.8 A * 40 m * 1 MV/m * 30e-6 s = 28.6 kJ. That's enough to run a 60W bulb for about 8 minutes.