We examine how nondestructive measurements generate spin squeezing in an atomic Bose-Einstein condensate confined in a double-well trap. The condensate in each well is monitored using coherent light beams in a Mach-Zehnder configuration that interacts with the atoms through a quantum nondemolition Hamiltonian. We solve the dynamics of the light-atom system using an exact wave-function approach, in the presence of dephasing noise, which allows us to examine arbitrary interaction times and a general initial state. We find that monitoring the condensate at zero detection current and with identical coherent light beams minimizes the backaction of the measurement on the atoms. In the weak atom-light interaction regime, we find the mean spin direction is relatively unaffected, while the variance of the spins is squeezed along the axis coupled to the light. Additionally, squeezing persists in the presence of tunneling and dephasing noise. For long atom-light interaction time, we equally show our methods can be used to prepare non-Gaussian correlated spin states.