We provide homogeneous optical (UBVRI) and near-infrared (NIR, JHK) time series photometry for 254 cluster (ω Cen, M 4) and field RR Lyrae (RRL) variables. We ended up with more than 551 000 measurements, of which only 9% are literature data. For 94 fundamental (RRab) and 51 first overtones (RRc) we provide a complete optical/NIR characterization (mean magnitudes, luminosity amplitudes, epoch of the anchor point). The NIR light curves of these variables were adopted to provide new light-curve templates for both RRc and RRab variables. The templates for the J and the H bands are newly introduced, together with the use of the pulsation period to discriminate among the different RRab templates. To overcome subtle uncertainties in the fit of secondary features of the light curves we provide two independent sets of analytical functions (Fourier and periodic Gaussian series). The new templates were validated by using 26 ω Cen and Bulge RRLs. We find that the difference between the measured mean magnitude along the light curve and the mean magnitude estimated by using the template on a single randomly extracted phase point is better than 0.01 mag (σ = 0.04 mag). We also validated the template on variables for which at least three phase points were available, but without information on the phase of the anchor point. We find that the accuracy of the mean magnitudes is also ∼0.01 mag (σ = 0.04 mag). The new templates were applied to the Large Magellanic Cloud (LMC) globular cluster Reticulum and by using literature data and predicted PLZ relations we find true distance moduli μ = 18.47 ± 0.10 (rand.) ± 0.03 (syst.) mag (J) and 18.49 ± 0.09 ± 0.05 mag (K). We also used literature optical and mid-infrared data and we found a mean μ of 18.47 ± 0.02 ± 0.06 mag, suggesting that Reticulum is ∼1 kpc closer than the LMC.