You just need practice and lots of it. Also, lots of dry-fire practice will help tremendously.
One thing that has helped many people I know (including myself) is the following:
If possible, have someone else at the range load your magazines with snap caps randomly placed throughout. Once you pull the trigger and it's a snap cap, you will see exactly what the problem is. My guess? You're flinching/anticipating recoil.
The target below may help as well.