Your sprocket might be warped. Remove it and lay it on a known flat surface. A sheet of glass or anything that you know is absolutely flat. You'll be able to see any warp and with a little work, a plastic headed hammer, a large Crescent wrench, etc, you should be able to get the sprocket to lay flush with the flat surface.
You also might want to make sure your wheel is true. A warped, (out of true) wheel can give you fits. Bent or loose spokes can also contribute to problems with truing the rear sprocket.
While you have the sprocket off, smooth up the teeth. Take any rough edges off. I like to use a 3-M metal finishing pad on a side grinder. In extreme cases rough teeth can cause the chain to jump and grab enough to derail it from the sprocket.
Alignment and tension are essential to a good running chain drive.
Tom