When the captain of a sailing ship gives the order "all hands on deck," it means that every available crew member needs to come up from below deck and gather on the deck to perform a task or deal with an emergency. Since every single person on the ship might be needed, this command signals the utmost importance and urgency.
The phrase "all hands on deck" has been in use since the 17th century, and it has since become a common idiom used in various contexts beyond sailing or naval activities. It implies that everyone should be involved, engaged, and contributing in a concerted effort to accomplish a shared objective or face a challenge.