If you've been to one of my group classes, you will se that I always conduct the Bunker class at the end of the program. This is because bunker shots are played better when overall technique of the swing has improved.
In terms of the over all set-up of a bunker shot, for a right hander the club face should be open (pointing right) to the target with the feet aiming left. For a left hander the face would be open again (pointing left) with the feet pointing right. This reason for the stance and the face to be open to the target is because we want to feel like we're hitting little 'slices' through impact. Meaning swinging on an outside-in path through the ball.
When your face is open and then you swing left through impact, you will have a nice thin divot in the sand. This is because you are using more of the bounce of the club. The bounce of the club is identified by the angle between the front of the club (leading edge) and the back of the club. You can see this angle quite clearly when holding the club up in front of you, gripping onto the shaft. The typical bounce of a SW is around 12 degrees. You can also buy different bounces when purchasing higher end wedges.
If you didn't open the face of a wedge at set-up, you will often see a very deep divot. This is a killer in the sand as the ball will often not make it out of the bunker. With the face open, it takes a nice slither of sand which cuts under the ball, propelling the ball out of the bunker.
In terms of ball position, this should be just forward of middle in the stance. When playing a bunker shot, you should aim to hit around an inch behind the ball. It is very important when talking about greenside bunkers, that the sand is always taken first. The sand will then lift the ball out of the bunker, safely onto the green.
In relation to the overall technique of the swing, just ensure that you hinge your wrists to 90 degrees with the left arm reasonably straight on the back swing. This is the classic 'L' position between the left arm and the shaft.
On the follow through just make sure that your hands reach shoulder height at the end of the swing. It is very important for all bunker shots that you follow all the way through to avoid deceleration.
One last aspect is that you are not allowed to ground the club in the sand during set-up. You are only allowed to touch the sand once making contact at impact. This is due to the bunker being classified as a hazard area. Not touching the sand also goes for when you enter into a bunker, just make sure you don't rest your club onto the sand.