Why does the Battery light come on when you come to a stop in the 1998 Pontiac Gran Prix?

Loose connections from the body electrical strap to the engine. You said battery but do you mean the charge light?