Proton and deuteron radiative capture in light nuclei