What is the reason for the different solubility of silver halides in ammonia?
Silver chloride is very thermodynamically stable in ammonia solution. The $K$ for the dissolution of silver chloride in ammonia solution is only $\pu{2.9E-3}.$ suggesting that the product — silver ammonia complex ion — is much less thermodynamically stable than the reactant, silver chloride. 

$$\ce{AgCl + 2 NH3 &lt;=&gt; [Ag(NH3)2]+ + Cl-}$$

$$
\begin{align}
K &amp;= K_\mathrm{sp}(\ce{AgCl})\times K_\mathrm{f}(\ce{[Ag(NH3)2]+})\\
  &amp; = \pu{1.8E-10}\times\pu{1.6E7}\\
  &amp; = \pu{2.9E-3}
\end{align}
$$

However, silver chloride will dissolve in an excess of concentrated ammonia solution due to Le Chatelier's principle. Despite the fact that silver chloride has a minuscule $K_\mathrm{sp}$ value, some free silver ions are present in solution. Addition of concentrated ammonia solution effectively consumes this free silver ion as ammonia, a good σ-electron pair donor ligand, combines with the silver ion. 

Ions themselves are not precipitates, as all bulk matter must be approximately electrically neutral, and so the silver chloride dissolves when hit with excess, concentrated ammonia. 

Also, note that the cyanide ion is also a good complexing agent with respect to silver. The cyanide ion has a surfeit of electrons on the carbon, and carbon is even less able to stabilize negative charge than nitrogen, making the cyanide ion reactive as a complexing agent. Hitting silver chloride and other silver salts with a source of cyanide ion will similarly cause the silver salt to dissolve into ions suspended in solution.