While we're reluctant to say it's mandatory to replace your sprockets when you replace your chain, it's idiotic to replace one without the other. Like PB&J, the two go together like a horse and carriage.
Over time the teeth on the sprocket wear out just like links on your sloppy chain. As the sprockets wear, the teeth get more "pointed" and are less likely to hold the chain. Thus, when you give it some gas the chain moves outward toward the peak of the point and eventually off the teeth, causing slippage. This slippage can cause serious damage like broken sprocket teeth and even a snapped chain. So when in doubt, change them both out.