To launch a good wedge shot, it's important to strike the little white ball (with the dimples) before you hit the big green one (the earth). And since every swing has a bottom to its arc, you need to position the white orb just behind it, so that your contact goes "white-then-green"—not vice versa.
The process is simple. During your warm-up on the range, check the divots you carve with your wedges. Their position, relative to your stance, indicates the low point of your swing. If you position the ball slightly behind the middle of your typical divot, you'll begin hitting wedges like Tom Kite—one of the best wedge players the game has ever seen. Take a look at his action in the photo below.
Of course, practicing ball position and wedge swings at the range isn't exactly like launching scoring shots on the course. In practice, every lie (or nearly every lie) is perfect. In actual rounds, imperfect lies abound. You often encounter shots from non-level stances on uneven contours around the greens, which wreak havoc on your wedge results. Suddenly, your wedge swing is bottoming out in a different spot relative to your stance, and you may be at a loss as to where you should position the ball. Enter green-then-white contact and a heavy dose of extra strokes from short range.
You can solve the problem in two easy steps:
1) From downhill lies
When your front foot is below your back foot, take a normal stance with a "centered" ball position, then move your lead foot down the hill and tilt your shoulders with the slope (see the photo below). Setting up this way delofts the club, so use a higher-lofted wedge.
2) For uphill lies
When your front foot is above your back foot, keep the ball centered in your stance. But this time, tilt your upper body so that your left shoulder is higher than your right. Whereas the previous setup subtracted loft from the face, this one adds it. Use a less-lofted club.
In both cases, the key is to adjust your shoulders so that they sit parallel to the slope you're standing on while maintaining good balance so you can swing through the shot. A good practice swing is essential, so you can "see" where your swing is bottoming out and making a divot. Use the divot's location to confirm that you've positioned the little white ball in the right spot (i.e., before your wedge strikes the big green one).
P.S. Seek out uneven lies on the practice range. These adjustments will soon become second nature.