In Panel data estimation, where data are dynamic, there are endogenous variables in the data. What are the criteria of selecting estimation technique either 2sls or gmm?
I think it would first help to recognize that GMM is a class of estimators that include OLS and 2SLS. That is, there is a way to construct a GMM estimator that is equivalent to the OLS estimator.
With OLS, the number of moment restrictions equals the number of unknown parameters, E[Xe]=0, so this falls into the subset of MM estimators. 2SLS where the number of endogenous variables equals the number of instruments would be another example of an exactly identified GMM estimator using the moment restriction E[Ze]=0, and thus also called MM.
But, you could have more instruments than endogenous variables. Now your system is over-identified with more moment restrictions than parameters to estimate. This is GMM in the fullest sense, though it will lead to the same estimation as typing IVREG in STATA.
Thus, the dichotomy of IV versus GMM is a false one. The AB estimator is both IV and GMM. In AB, the instruments (or in GMM speak--moment restrictions) follow algebraically from assumptions about how the dependent variable is related to the unobservable and time-series properties of the unobservable. The number of instruments is greater than the number of unknown parameters because lagged (and twice-lagged and thrice-lagged) values will tend to be weak instruments, so a large set is often necessary.
The issue then is not some inherent property of IV or GMM, but rather whether the authors have adequately argued for why the lagged value is correlated with contemporaneous value (ok, that is pretty easy) and why the time structure of the unobservables imply the exclusion restriction is actually valid (it will not be if the unobservable is MA or if fixed-effects are involved).