In this article we address the general approach for calculating dynamical dipole polarizabilities of small quantum systems, based on a sum-over-states formula involving in principle the entire energy spectrum of the system. We complement this method by a few-parameter model involving a limited number of effective transitions, allowing for a compact and accurate representation of both the isotropic and anisotropic components of the polarizability. We apply the method to the series of ten heteronuclear molecules composed of two of ( 7 Li, 23 Na, 39 K, 87 Rb, 133 Cs) alkali-metal atoms. We rely on both up-to-date spectroscopically-determined potential energy curves for the lowest electronic states, and on our systematic studies of these systems performed during the last decade for higher excited states and for permanent and transition dipole moments. Such a compilation is timely for the continuously growing researches on ultracold polar molecules. Indeed the knowledge of the dynamic dipole polarizabilities is crucial to model the optical response of molecules when trapped in optical lattices, and to determine optimal lattice frequencies ensuring optimal transfer to the absolute ground state of initially weakly-bound molecules. When they exist, we determine the so-called "magic frequencies" where the ac-Stark shift and thus the viewed trap depth, is the same for both weakly-bound and ground-state molecules.