If Flareon's "Flare Effect" ability or Vaporeon's "Aqua Effect" ability or Jolteon's "Electric Effect" ability adds Fire or Water or Electric type to a Darkness Type Pokemon, does Dangerous Energy get discarded since it says, "If this card is attached to anything other than a {D} Pokemon, discard this card"?
No, it is not discarded. Even with the addition of another type to the Darkness Pokemon it is still also a Darkness Pokemon.
Source: Ancient Origins FAQ (2015-08-13), TPCi Rules Team (2015-08-13)

Relevant cards

Note: All applicable cards may not be listed below.
XY7_13
XY7_22
XY7_26
XY7_35