Here’s how to analyze and repair gaps.
1. If you can see light between the doorstop (the strip of wood against which the door rests) and the edge of the door on one side, yet the door width is okay, you need to reposition the door by resetting or shimming the hinges.
2. If the door doesn’t close tight to the doorstop, but the door latches properly, you may be able to move the doorstop closer.
Carefully pry the doorstop from the jamb, and reposition it. If the gap is fairly consistent, it’s easy, and even if there’s a slight variance, you can bend the doorstop slightly as you reattach it. Starting at one end, drive your nails, forcing the doorstop in-line with the door at each new nail location.
3. You can compensate somewhat for exterior door warps with spring-loaded weatherstripping, which follows the contour of the door.
But if the warp is extreme, you should probably buy a new one.
4. Here’s a last-ditch effort if you really want to keep a badly-warped door. Decide which two opposite corners should be pulled back, and screw metal eye hooks into the face of the door near these corners. Then attach wires to both hooks and join them with a turnbuckle, which allows you to gradually increase the tension on the wires. For leverage, put a scrap of wood between the wire and the door, about half way down. Increase the tension slightly every day for a few days. If this works, seal all bare wood and re-hang the door.