Non-equilibrium dynamics and large deviations in stochastic lattice models via tensor networks