Zakah is a debt that we owe to Allah on behalf of the poor, and like all debts, it should be paid off for the benefit of the salvation of the deceased.
Majority of scholars are of the view, if a person has died while still owing zakah, it should be taken out from his inheritance before distributing among the legal heirs; for inheritance should be distributed only after the debts are paid, since zakah is a debt one owes to Allah. The Prophet is reported to have said, "debts one owes to Allah should take precedence over other debts in regard to the issue of repayment."
Therefore, if you intend to pay the zakah on behalf of your deceased parents or relatives, that is indeed a great act of virtue meriting tremendous rewards. Since Allah is Generous and Forgiving, you can hope that Allah will redeem the soul of the deceased on account of your gift.
As for the question how do you do that, if you can ascertain the facts by consulting those who were close to him, you should do so; otherwise, you can make an educated guess, and make a rough estimate, and thus pay it on his behalf.