Now you know another thing to fix!
Depending on the style of latch, you might be able to attach a string, then drill a hole for the string to go through, so you can pull the string to open it from inside.
Or with some styles of latch, you can remove a carabiner to open it, and then put the carabiner back on the latch in a way that prevents it from latching.
In case it happens again:
It is often possible for a person to crawl out the pop door of a coop (unless it's locked too), or perhaps out through the nestboxes since they are external. (Although that won't work once you get latches on the nestboxes.) You can opening the coop windows and yell to help other people hear you. And of course if you carry a cell phone, you can telephone your parents to let you out.