The ignition coil or module for a two-stroke engine regulates the ignition power, and converts it to charging electricity for the battery system. When the module and coil begin to fail, it's typically because the units have been burnt out. The result will be an engine that performs badly, if it starts at all. Testing such units involves using a few electrical tools to gauge if the part still works, since most modules and coils are sealed with no serviceable parts.
Disconnect the spark plug cap from the spark plug. Carefully remove the plug wire to the ignition coil from its hooks that keep it in place on the engine. Pull the plug wire out of the coil where it inserts: It's typically just pushed-in onto a spike in the coil.
Use a screwdriver to disconnect the coil unit from its harness, or bracket on the engine. Put the securing screws aside. Carefully pull the coil off the bracket, and then carefully disconnect the engine and vehicle wires from the coil itself.
Attach the ends of a multimeter to the coil connections for input and to ground, testing electrical resistance in the unit. Replace the coil unit with a new one, if the reading shows as infinity or zero. This means that there is no resistance the unit is burnt out.
Take the good unit, or a new coil and reconnect it to the engine bracket. Insert a new length of spark plug wire, after connecting the spark plug cap to one end. Insert the other end into the coil receptacle for the wire. Reconnect the spark plug cap to the spark plug.
If a replacement coil for your two stroke engine is fairly inexpensive, you're better off just replacing it with a new unit, rather than trying to make an old one work again.
Do not just yank electrical wires off the coil connections. Many times, two stroke engine wires are old and will break or snap from sudden pulls. Pull on the wire end connector instead, when separating from the coil.