this is probably because the locator you are using as your pole vector lies off of your rotation plane. When you assign it as your pole vector target, the rotation plane adjusts to follow it's new target, there by twisting the joints into an undesirable position. to solve this issue you need to make sure the locator lies precisely along the rotation plane before you constrain the IK to it.
To align it, do these two things:
First, temporarily point constrain and orient constrain your locator to your shoulder joint. then delete the constraints. This action will place your locator in a central location to the joint you are affecting with the IK, as well as orienting it along the rotation plane axis of your arm.
Second, translate the locator along one axis behind your arm (in the same direction as your bend).
This should do the trick.
Hope this helps,
-Matt