Say Ditto uses its "Transform" Ability to become a Klefki, then Klefki uses its "Wonder Lock" Ability to attach it to another Pokemon as a tool. When doing this what happens to the Ditto and Klefki cards?
The Ditto card gets discarded when Klefki is attached as a tool.
Source: TPCi Rules Team (2019-01-24)
If Klefki with the "Wonder Lock" Ability is attached to a Pokemon as a Tool card, what happens if "Silent Lab" stadium comes into play? Does "Wonder Lock" shut off and Klefki get discarded, or does it remain attached to the Pokemon?
Once Klefki is attached as a Pokemon Tool card it retains its effect even when its Ability has been disabled. Once it's attached, it is essentially treated as a Tool with that text, so shutting off its Ability doesn't matter at that point. However, if something such as Lysandre Labs is in effect, Klefki won't be discarded at the end of your opponent's turn.
Source: TPCi Rules Team (2019-01-03)
Can I use Klefki's "Wonder Lock" Ability if Klefki doesn't have any cards attached to it?
Yes, you may.
Source: Steam Siege FAQ (2016-08-04), TPCi Rules Team (2016-08-04)