It might sound like a medical emergency to say someone is in stitches, but the phrase is actually used to describe someone who is laughing really hard.
In stitches probably comes from stitch, a sudden, sharp, but harmless pain in your side usually caused by too much exertion. It's sometimes called a runner's stitch because it happens a lot to runners. Laughing very hard for a long time uses a lot of breath, much like running does, so it makes sense that it could cause the same type of pain. Maybe watching your favorite comedian's new special counts as a workout?