Literally the word الحمد in Arabic is related to the Actions, when you praise someone for his Good 'doings' you actually تحمد افعاله
and since Muslims believe the life is controlled by God or Allah they praise what He have offered them, when it is pleasant they say الحمد لله والشكر but when it is unpleasant they would say الحمد لله على كل حال
praise to be for God upon whatever condition.
This is in brief some lingual and cultural light on the word الحمد