Yes, it is bad to mockingly laugh at someone who passes gas. It hurts the feelings of the person being laughed at.
What the Qur’an and Sunnah Say
Allah says, “You who believe, men should not make fun of other men, perhaps the latter are better than them. Nor should women make fun of other women, perhaps the latter are better than them.” (Quran, 49:11)
The Messenger of Allah was once giving a sermon and criticized anyone who would laugh at someone for passing gas, saying, “Why would anyone laugh at what he does himself.” (Bukhari #4653, Muslim #5073)
What the Scholars Said
Imam An-Nawawi explained that it is good manners to just ignore it and pretend as if you did not hear anything. (Al-Minhaj Sharh Sahih Muslim)
Shaykh Mustafa Umar