Most foods are cooked between 3 and 6 inches from the broiler (measured from the flame or electric coil to the highest point of the food). Generally, the thinner the food, the closer to the broiler you can place it. If you place a food too close to the broiler in relation to its thickness, it will be dry or overcooked on the outside before the inside is properly cooked. If you place a food at too great a distance from the broiler, the exterior will not develop the sought-after deep color and somewhat crusty texture by the time the center of the food is cooked.
Your preference about degree of doneness should also play a part in determining the distance between the broiler and food. The rarer the meat is to be cooked, the closer you can place it to the heat source, because cooking time will not be long enough to overcook the food's exterior.