The electron and antineutrino are created at the moment of decay.
Did you really mean to ask, "how do we know this is the case, instead of the electron and antineutrino previously existing inside of the nucleus?"
Once upon a time (about 1910-1930), physicists seriously considered the idea that an atomic nucleus contains Z+N protons and N electrons. (They didn't know about neutrons yet.) When an electron flies out, that's beta decay.
1. One problem comes from the Heisenberg uncertainty principle. If you use it to estimate the energies that the "nuclear electrons" might have, you get a few hundred MeV. But in beta decay, the energies of the ejected electrons are only a few (<10) MeV.
2. Another problem is that you can't get the "spin" of the nucleus to come out right, in many cases, if you assume that a nucleus has Z+N protons and N electrons, instead of Z protons and N neutrons.
3. Another problem is that for a particular kind of beta-decay, you would expect the electron to have a specific fixed energy, corresponding to the difference in mass between the nuclei before and after the decay. But it has instead a range of energy, with the maximum energy being the originally-expected "fixed" energy.
So Pauli proposed a new particle, which we now know as the antineutrino, which carries off some of the beta-decay energy, and has spin 1/2 like the electron so we can make the nuclear spin come out right. (
Pauli actually called his new particle a "neutron". What we now know as the neutron hadn't been discovered yet!)
(Here's the http://www.library.ethz.ch/exhibit/pauli/neutrino_e.html.)
But then you still have problem #1 with the uncertainty principle.
In the meantime Chadwick discovered the "real" neutron, and a bit later Fermi came up with a theory that the electron and neutrino are created when a neutron decays into a proton. This was the beginning of modern weak-interaction theory.