It's perfectly normal for your chest and ribs to hurt when you laugh hard and it happens to me too as well as many other people.
Laughing hard causes your muscles to tighten and that can cause you to have pain in the ribs or chest.
As long as the pain goes away after laughing then you're likely okay but if the pain is still there then you might want to see a doctor but it's perfectly normal for our chest, sides and ribs to hurt when laughing.
There's also a term for it which is "pleurisy" that is a sudden sharp, stabbing, burning or dull pain in the right or left side of the chest during breathing, especially when one inhales and exhales.
The pain of Pleurisy feels worse with deep breathing, coughing, sneezing, or laughing.