As in arranging the rocks in your rock garden, take your cue from nature. In nature, plants that grow amongst the rocks like well-drained soil. As a general rule, then, you would want to mix sand into the soil that you'll be using for planting. But it's best to know the particular requirements of the plants that you'll be selecting, and to base your soil preparation on that.
Knowing your plants' particular requirements is even more important in preparing your soil to have the proper pH level. Learn ahead of time, while in the process of selecting plants, what kind of soil pH they like, and prepare the soil accordingly. An individual plant choice may prefer acidic or alkaline soil. Don't mix low-pH plants (i.e., acid-lovers) with high-pH plants (i.e., alkalinity-lovers).
Finally, whether your rock garden is in a sunny or shady location will have a great influence on the plants you select for planting. Again: know the requirements of your plants, and keep plants with like requirements together, including watering requirements.