If your shared USB printer seems to come and go with a mind of its own, ensure the PC it's attached to isn't hibernating. If possible, connect your printer to a desktop PC rather than a laptop and leave it switched on.
To cut back on power consumption, allow the display to go into sleep mode.
In XP, verify that File and Printer Sharing for Microsoft Networks is installed for all network adaptors. This way, switching between wired and wireless networks won't kill printer sharing. Go to Control Panel, Network Connections and, for each network adaptor, right-click the device and select Properties. If you don't see File and Printer Sharing for Microsoft Networks, click the Install button to add it.
Better yet, set up a print server so you don't have to worry about working through a host PC. Some routers have built-in USB printer ports; standalone print servers plug into your router. If you use a multifunction device for printing, choose a print server that supports scanning, such as D-Link's USB RangeBooster G Multifunction Print Server.
For more information on network security, our sister site Techworld has a comprehensive network security resource page.