The experimental realization of the regime of quantum degeneracy with weakly interacting ultracold atoms opened the way to numerous exciting experiments directly probing fundamental effects of quantum mechanics. In addition, the remarkable control on the parameters reached in cold atoms loaded in optical lattices setups led to employ out of equilibrium processes to increase the ability to probe the properties of these systems. In this talk we shall present the analysis of an experimental technique for probing ultracold atoms in an optical lattices by periodic lattice depth modulations. We find that for bosons, sharp energy absorption peaks are not unique to the Mott insulating phase at commensurate filling but also exist for superfluids at incommensurate filling. For strong interactions, the peak structure provides an experimental measure of the interaction strength. Moreover, the peak height of the peaks at $hbaromegagtrsim 2U$ can be employed as a measure of the incommensurability of the system. For fermions, the lattice modulation produces double occupied sites. The spectrum of the induced double occupancy allows to determine the pairing gap in a superfluid state and the interaction energy in the Mott-insulator.