Try to locate where the noise is coming from. If it’s coming from the inside unit, the sound may be coming from loose screws or the bolts of your air conditioner’s unit casing. Turn off your air conditioner and tighten them.
If the sound is coming from the outdoor unit, turn off your air conditioner and check if there is anything that’s fallen inside. Things like rocks may be hitting the fans, causing the banging noise. Remove them if possible.
If your appliance isn’t operating normally while making this noise, contact an authorised service agent.