The wire for the light is Earth when no power comes from the alternator, other side of light goes to switched live, then when alternator is providing power the wire becomes live thus the light goes out, this needs to happen for the alternator to work. Also make sure the engine has a really good earth strap or add another and make sure the earth is really clean.