Shaikh Bin Baz rahimahullah said:

Question:

What is the ruling on laughing in prayer? Does the one who laughs in prayer have to repeat the prayer?

Answer:

“Laughing in the prayer invalidates the prayer according to consensus of the people of knowledge. If he laughs in prayer it is invalid. Likewise, if he spoke deliberately in his prayer except if he was ignorant or it was forgetfully. So the prayer is not invalidated by forgetful speech or speech due to ignorance. However, laughing invalidates the prayer because it is playing in it and mockery. We ask Allah for well being”

[Reference]

The Permanent Committee  said:

Question:

What is the ruling on laughing in prayer, whether he did not know it invalidates the prayer or he knew?

Answer:

“Laughing in the prayer is not allowed whether he knows laughing invalidates the prayer or not. It invalidates the prayer by consensus.

With Allah is Tawfeeq and may peace and blessings be upon our Prophet Muhammad, his followers, and Companions”

[Reference]

Translated by

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan