There's actually a medical term for laughing at inappropriate times so you're not the only one that does laugh during inappropriate times.
The medical term for laughing at inappropriate times is called Pseudobulbar affect and it's also known as emotional incontinence.
Not to be confused with urinary incontinence as it has nothing to do with your bladder. Incontinence also means loss of control and with emotional incontinence you have no control over the times you laugh and it's usually caused by a nervous system disorder.
Some people may not have that disorder and still laugh in certain situations.