We study the heating rate of r-process nuclei and thermalization of decay products in neutron star merger ejecta and macronova (kilonova) light curves. Thermalization of charged decay products, i.e., electrons, α-particles, and fission fragments, is calculated according to their injection energy. The γ-ray thermalization processes are also properly calculated by taking the γ-ray spectrum of each decay into account. We show that the β-decay heating rate at later times approaches a power-law decline as ∝t-2.8, which agrees with the result of Waxman et al. We present a new analytic model to calculate macronova light curves, in which the density structure of the ejecta is accounted for. We demonstrate that the observed bolometric light curve and temperature evolution of the macronova associated with GW170817 are reproduced well by the β-decay heating rate with the solar r-process abundance pattern. We interpret the break in the observed bolometric light curve around a week as a result of the diffusion wave crossing a significant part of the ejecta rather than a thermalization break. We also show that the time-weighted integral of the bolometric light curve (Katz integral) is useful to provide an estimate of the total r-process mass from the observed data, which is independent of the highly uncertain radiative transfer. For the macronova in GW170817, the ejecta mass is robustly estimated as ≍0.05 M☉ for Amin ≤ 72 and 85 ≤ Amin ≤ 130 with the solar r-process abundance pattern. The code for computation of the heating rate and light curve for given initial nuclear abundances is publicly available.