With the kinetic freeze-out nucleons and antinucleons obtained from the quark combination model, we study the production of light nuclei and antinuclei in the (anti-)nucleon coalescence mechanism in relativistic heavy ion collisions. We derive analytic formulas of the momentum distributions of different light nuclei and apply them to compute transverse momentum (p T ) spectra of (anti-)deuterons (d, d) and (anti-)tritons (t, t) in Au-Au collisions at √ s NN =7.7, 11.5, 19.6, 27, 39, 54.4 GeV. We find that the experimental data available for these p T spectra can be well reproduced. We further study the yields and yield ratios of different light (anti-)nuclei and naturally explain their interesting behaviors as a function of the collision energy. We especially point out that the multi-particle yield ratio tp/d 2 should be carefully corrected from hyperon weak decays for protons to probe the production characteristics of light nuclei. All of our results show that the coalescence mechanism for (anti-)nucleons plays a dominant role for the production of light nuclei and antinuclei at the RHIC beam energy scan energies.