  Using Density Functional Theory, competition between Mott-Hubbard and
intervalence charge transfer mechanism of electron localization is revealed in
AgF$_2$, an important silver analogue of oxocuprates. We show that at reduced
temperature and electron correlations AgF$_2$ becomes metallic and dynamically
unstable in respect to CDW phonon modes that promote charge ordering. The CDW
instability is closely related to Kohn anomaly and Fermi surface nesting. The
long advocated KBrF$_4$ type CDW Ag$^{1+/3+}$F$_2$ structure and its facile
transformation to the ground state Ag$^{2+}$F$_2$ phase is explained. Our
results point out to intimate interplay between lattice, charge and spin
degrees of freedom in seemingly simplistic binary metal fluoride.
