Thermoelectric effects in semiconductor nanostructures: Role of electron and lattice properties