For lines that go right/left (usually called horizontal):
1) Get a group in a straight line. If you're a section-leader, or even just the front of a line in basic block, get your line together and get them straight. Make sure you have someone who's not in the line, to get you in it too, and get it straight.
2) Get everyone to look directly ahead, and memorize where the person next to you is in your peripheral vision. Do NOT let them move from that position.
3) Practice marching the line across the field. Again, don't let anyone move from your peripheral vision.
For lines forward and backward (usually called vertical) or diagonals:
1) Get your group/line/whoever in the needs-to-be-dressed line, and have everyone look at the person in front of them.
2) As Blink Day 41 said, make sure you can't see anyone in front of you, besides the first person. If you're 6'8" and the next person is a 5'3" fish, then obviously you'll see some people, but you get the idea.
3) If needed, have an outside viewer straighten the line, and just have everyone memorize the position of the person they're dressing to, and everyone else. In rare cases (twice in my high-school career) you'll come across a set where the line appears straight to the pressbox, but not to the students. If this is the case, go with the pressbox; that's where the judges are.
It's as simple as that.