Screws have phenomenal tensile strength which is far greater than nails. Screws build a tight adhesion between two pieces of wood.
Nails are used for joints, because even after multiple twists the wood at the joints will remain together when nails are used. But a screw will come off after a single twist, if screws are used to hold wood at the joints.
For any static wood work screws are better than nails because of their tensile strength.