No it isn't haram to laugh in Islam, Even Muhummad (sallallahu alayhi wasalam) used to laugh, but excessive laughing is a fahesha(indescency) and is strongly considered unethical.
From what is said in your Question I can infer that the two people were laughing at hearing aid. Which is used by people who have difficulty in hearing. The two old people said Astagfirullah because, it is bad to laugh at other peoples shortcomings (which are there because Allah kept them there), because it could be anyone that might have or will have a disability(here hearing), even me and you.
Jaabir ibn Samurah radiyallahu anhu says, “The leg of the calf of Rasoolullah sallallahu alayhi wasallam was slightly thin. His laugh was only that of a smile. Whenever I visited Rasoolullah sallallahu alaihe wasallam, I thought he used kuhl on his eyes. Whereas he had not at that time used kuhl.” (Jami at Tirmidhi - 216)
And there are more such Ahadith
Even if you are joking don't makeup jokes, but be true as was an incident in time of Muhummad (sallallahu alayhi wasalam);
An old woman came to Prophet Muhummad (sallallahu alayhi wasalam) and inquired of him, that would Old people enter janah, In reply the Prophet (sallallahu alayhi wasalam) said No Old people won't enter Jannah, Hearing this the Old Woman began to Cry, the Prophet replied again that everyone be it old or young will enter jannah young, and smiled. On hearing this the Old woman became happy.