Why do acids donate protons?
Using the following generic reaction, where an acid donates $\ce{H+}$, i.e. a proton:

$$\ce{HX + B &lt;=&gt; X- + HB+}$$

If a lone pair of electrons on $\ce{B}$ has a higher energy than than than the resultant lone pair of electrons on $\ce{X-}$, then the $\ce{H+}$ on $\ce{HX}$ will be transferred to $\ce{B}$ to form $\ce{HB+}$ in order to stabilize the high energy lone pair on $\ce{B}$ in the form of a bond.


So, there are two things that influence whether an acid will transfer a proton: 


The energy of the lone pair on the base
The energy of the lone pair on the resultant the conjugate base



If the conjugate base of the acid is more able to stablize a lone pair than the basic starting material is, an acid-base reaction will occur, and a majority of the basic reactant will end up being protonated.