If I have Porygon-Z with "Crazy Code", but my opponent has Honchkrow GX with "Ruler of the Night" active, which Ability takes precedence?
Even though you're using an Ability to attach the Special Energy card, Honchkrow GX's Ability prevents you from playing it from your hand.
Source: TPCi Rules Team (2019-06-06)
Would Honchkrow GX's "Ruler of the Night" Ability prevent me from using Charjabug's "Battery" Ability to attach it to Vikavolt as an Energy card?
Yes it would prevent that because Charjabug would be a Special Energy card being played from your hand.
Source: Unbroken Bonds FAQ (2019-04-19), TPCi Rules Team (2019-05-02)