Excitations of pygmy dipole resonances in exotic and stable nuclei via Coulomb and nuclear fields