A model of an atomic condensate in a double-well potential with the possibility of tunneling between wells has been considered. The process of tunneling is modified by the optical probing of one of the wells by a beam of nonresonance radiation. The phase of the passing beam is correlated with the number of atoms in the probed well; as a result, coherence between states with different numbers of atoms is partially destroyed. The solution of the initial quantum kinetic equation for the states of the condensate has been obtained under the assumption of the dominant role of such a decoherence. An expression has been obtained for the correlation function of the amplitude of radiation passing through the probed well. The opposite situation of a slow destruction of coherence as compared to the rate of tunneling has also been considered. The stationary distribution in the numbers of atoms in wells for a given number of atoms in the condensate is uniform in both cases.