The first attribute would be experience. These following questions can be valuable to find the answer to.
1. What background and experience does the teacher have in their own life of dancing?
2. How much do they know about the styles you want to learn?
3. How long have they been teaching?
4. Have they gotten favorable reviews from past students?
Another important factor is how they teach?
1. Are the steps broken down and said in the different ways that students learn? Some people are numbers oriented, some are word, and others are visual. In my classes I explain the various ways, and ask the students if they know by what process they learn the best. Some do not know, so I suggest trying these, and see which works for them. For example, a student may be a numbers person in their life, and find out that for dancing they need words to accomplish the steps better. Once the steps come more easily, what you said to yourself, whether counting or saying left and rights, that is what is needed till it becomes more automatic through much practice.
2. Does the instructor stand in front of the class, show the steps and whoever gets it, great, and who does not, oh well? A good instructor will go around and help those students who may be having difficulty. Obviously, in a larger class, it becomes harder to assist everyone, yet I do my best to help for a short time, so that those students are not so frustrated. Telling the class to please ask questions, when needed is another sign of a good instructor. Having the guys on one side of the room, and gals on the other, and breaking down the steps for each side is helpful. Then demonstrating the particular step with a student will show them what it is supposed to look like. Practicing the new step without music first, and then with music works well.
3. Making the class fun and instructional is a better bet on a good teacher. Are too many dances taught in the class time, that the students cannot remember what is what? Another positive sign is that the instructor would always review the steps of the previous week, as many students do forget what they did the week before. It does take time for the steps to become muscle memory, where at the beginning, a lot of thinking is happening. Eventually the social fun will be there to enjoy all the effort that was put into learning.
Do the teachers themselves need to be good dancers?
Not necessarily, yet it definitely helps for demonstration purposes and all around in the teaching process. I have a professional background as a jazz dancer, which has helped me as an instructor, as well as for my own social dancing. Try out different teachers and see who you might fit with the most.
Just get started somewhere, in a class and/or private lessons, whether you have been away from dancing for awhile, or a new beginner wanting to venture out. You will be glad you did.