An electrostatic force is responsible for the attraction between the ball and the wall. When we rub the balloon with a synthetic cloth, it gets charged and when the balloon is taken near the wall, it will get attracted to the uncharged wall because of the electrostatic force.