  We study, both theoretically and experimentally, the dynamical polarizability
$\alpha(\omega)$ of $\textrm{Rb}_2$ molecules in the rovibrational ground state
of $\mathrm{a}^3\Sigma_u^+$. Taking all relevant excited molecular bound states
into account, we compute the complex-valued polarizability $\alpha(\omega)$ for
wave numbers up to $20000\:\textrm{cm}^{-1}$. Our calculations are compared to
experimental results at $1064.5\:\textrm{nm}$ ($\sim9400\:\textrm{cm}^{-1}$) as
well as at $830.4\:\textrm{nm}$ ($\sim12000\:\textrm{cm}^{-1}$). Here, we
discuss the measurements at $1064.5\:\textrm{nm}$. The ultracold
$\textrm{Rb}_2$ molecules are trapped in the lowest Bloch band of a 3D optical
lattice. Their polarizability is determined by lattice modulation spectroscopy
which measures the potential depth for a given light intensity. Moreover, we
investigate the decay of molecules in the optical lattice, where lifetimes of
more than $2\:\textrm{s}$ are observed. In addition, the dynamical
polarizability for the $\mathrm{X}^1\Sigma_g^+$ state is calculated. We provide
simple analytical expressions that reproduce the numerical results for
$\alpha(\omega)$ for all vibrational levels of $\mathrm{a}^3\Sigma_u^+$ as well
as $\mathrm{X}^1\Sigma_g^+$. Precise knowledge of the molecular polarizability
is essential for designing experiments with ultracold molecules as lifetimes
and lattice depths are key parameters. Specifically the wavelength at
$\sim1064\:\textrm{nm}$ is of interest, since here, ultrastable high power
lasers are available.
