Well, if it’s got a solid state drive in it like the MacBook Air, your data is likely fine.
If you’ve got a normal hard drive in it there’s a chance the drive heads clanged against the platter possibly damaging the drive, but if it’s a Mac that’s been made in the last 5 or 6 years it has something called a Sudden Motion Sensor whereby if your Mac detects a drop (with accelerometers) it will park the hard drive so that it has a greatly reduced chance of damaging your data on the drive.
Physical damage (like dents) are too unpredictable for me to say if other components are ok. If you had things plugged into the ports, you have a greater chance of damaging the logic board, but otherwise, give it a good look and note any damage sustained. If you’ve got some, drop me a note and we’ll see what’s what.