One of the first rules I learned as an audio engineer is the 3 to 1 Rule.
The 3:1 rule states that when two or microphones are recording multiple sources "the distance between the microphones should be at least three times the distance from each microphone and it's sound source."
The reason for this is simple; to avoid phase issues which can ruin the recording of a great performance.
The phase cancellations are caused by small timing delays between two or more mics picking up the same signal.
For instance a delay of 2.5 milliseconds causes frequency cancellations at 200, 600hz and 1khz. Change the delay of the second mic to 20 milliseconds and the cancellations now occur at 25, 75 and 125 hz. which is much better because its at the low end of the frequency range. But this won't work with drums and percussion since it will cause flamming (double hits) and drastically reduce the impact of the drums.
To prevent this issue use directional (cardiod) microphones and place them so the sides and rear of the microphone is facing the other source. There will always be some leakage but due to the reduced SPLs at the side and rear of the microphone the phase issues are usually negligible.
When recording a single sound or group of sounds with two mics use whatever stereo technique gives the best sound (X/Y, Spaced Pair, M-S, ORTF, Blumlein etc.). Just make sure that both mic diaphragms are exactly the same distance from the sound source (use a tape measure if necessary).
Here's an article on six different stereo techniques on
AudioTuts.
Don't be afraid to experiment and let your ears be the judge. Sometimes you have to bend the rules to get the desired results.