Ammonia is used in detection of Cu2+ ion because:
Ammonia acts as a Lewis base due to the presence of lone pair of on the nitrogen atom.so,it can form coordinate bond transition metal cations to from complex compounds.Ammonia reacts with a solution of Cu2+ to from a deep blue coloured complex.The reaction for the above complex compound can be written as follows:
Cu2+(aq)+4NH3(aq)→[Cu(NH3)4]2+(aq)
Deep Blue
Hence option A is correct.