All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Laughter in the situations you mentioned does not consist in mocking or ridiculing religion or the actions of Allaah. The object of laughter here are the words or actions of some people. If one could not help laughing at the words or actions of others (i.e. it was genuinely beyond one's control), he bears no sin for that as long as it does not imply mocking them or looking down on them.
It was reported on the authority of Muhammad ibn Sa‘d from his father that "Once ‘Umar ibn Al-Khattaab asked permission to see the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, while there were some Qurayshi women in his presence asking him many questions and raising their voices. When ‘Umar was given permission to enter, the women hurried to veil themselves from him. ‘Umar came in while the Prophet, sallallaahu ‘alayhi wa sallam, was laughing. ‘Umar said, 'May Allaah keep you laughing always, O Messenger of Allaah! My father and mother be sacrified for you! (What made you laugh?)' The Prophet, sallallaahu ‘alayhi wa sallam, replied, 'I am astonished at these (women) who were in my presence; as soon as they heard your voice, they hastened to veil themselves." [Al-Bukhari]
It is better, though, to try not to laugh at people for fear that it might sadden a fellow Muslim or cause him to think that he is being ridiculed.
Allaah Knows best.