Theoretical framework for the description of electromagnetic or gravitational radiation from time-dependent distributions of distant sources