Using a proton-proton collision data sample corresponding to an integrated luminosity of 3 fb$^{-1}$ collected by LHCb at center-of-mass energies of 7 and 8 TeV, about 3800 $Xi_b^0toXi_c^+pi^-$, $Xi_c^+to pK^-pi^+$ signal decays are reconstructed. From this sample, the first measurement of the $Xi_b^0$ baryon lifetime is made, relative to that of the $Lambda_b^0$ baryon. The mass differences $M(Xi_b^0)-M(Lambda_b^0)$ and $M(Xi_c^+)-M(Lambda_c^+)$ are also measured with precision more than four times better than the current world averages. The resulting values are $frac{tau_{Xi_b^0}}{tau_{Lambda_b^0}} = 1.006pm0.018pm0.010$, $M(Xi_b^0) - M(Lambda_b^0) = 172.44pm0.39pm0.17 MeV/c^2$, $M(Xi_c^+) - M(Lambda_c^+) = 181.51pm0.14pm0.10 MeV/c^2$, where the first uncertainty is statistical and the second is systematic. The relative rate of $Xi_b^0$ to $Lambda_b^0$ baryon production is measured to be $frac{f_{Xi_b^0}}{f_{Lambda_b^0}}frac{{cal{B}}(Xi_b^0toXi_c^+pi^-)}{{cal{B}}(Lambda_b^0toLambda_c^+pi^-)}frac{{cal{B}}(Xi_c^+to pK^-pi^+)}{{cal{B}}(Lambda_c^+to pK^-pi^+)} = (1.88pm0.04pm0.03)times10^{-2}$, where the first factor is the ratio of fragmentation fractions, $btoXi_b^0$ relative to $btoLambda_b^0$. Relative production rates as functions of transverse momentum and pseudorapidity are also presented.