Assuming they are hydraulic, the key is to have more than enough space so the pads don't rub. After 2 or 3 squeezes on the brake levers, the pistons position reposition themselves, so setting an arbitrary gap won't actually do you any good. It is a good idea to center the caliper slot with respect to the rotor, with the pads temporarily removed. If the caliper itself is too close to the rotor, no amount of pad positioning will be able to correct for that.