When you tread (or walk) a fine line, you are trying to keep your balance between two alternatives, rather as if you were walking carefully along a narrow tightrope. Neighbors have to tread a fine line between being friendly and being nosy. A related expression is “there is a fine line between” two alternatives: “there’s a fine line between enthusiasm and fanaticism.” In this case you aren’t traveling along the line, but crossing over it. The fineness of the line suggests how subtly the two alternatives blend into each other. The first expression is used when you’re being cautious; the second is used when you’re observing how close two alternatives are to each other.
The expression “toe the line” means something rather different. It describes toes obediently and conscientiously lined up for review, military style. It refers to situations in which you are trying to be very careful to follow the rules, do precisely the right thing. Strict parents make their children toe the line.
It does not involve the emphasis on alternatives referred to by the other expressions. Envision yourself standing in front of a line like the starting line for a race. Such a line need not be particularly fine. What is emphasized here is the straightness of the line. But many people confuse “tread a fine line” with “toe the line” and use the mangled expression “toe a fine line.”
See also tow the line