Here are some reasons why students speak L1 in class. You will notice that not all of them are always bad things, and speaking L1 in class is not always a bad thing either. However, some of them are things you should respond to- the general rule being that if they speak L1 only when you have planned for them to do so, then that is the perfect use of L1. Ideas for how to tackle each point are given underneath.
Possible reasons why students speak L1 in English classes
1. They want to make jokes that they can't make in English
A couple of quick jokes in L1 can really lighten the load for the students and make the rest of the class easier to teach, but any more than that and it starts to cut into the time they have to speak English. If they are at a level when they should be able to tell that joke in English, you can ask the class to translate or do a whole class on jokes (puns can be good for pronunciation practice and story-like jokes for narrative tenses). In lower level classes, humour must necessarily be mainly physical, so doing mime and roleplays where they get up and move around can help them learn to express themselves that way.
2. Only one person understands the instructions or language
This is a common situation that really needs to be avoided, as it can quickly reach the point where students don't even listen to you because they know a translation is coming soon. Techniques include teaching students the language they will need to understand what you are going to say ("Open your books", the names of tenses and word groups etc); writing down, simplifying and practising your instructions before the class; and getting in to routines so they know what to do at each point in the class.
3. They want to double check that they have understood an explanation
Even if you believe that avoiding L1 for explanations is useful for the practice of English and to show that anyone can communicate in easy English, there often comes a time when the only way students can confirm that they understand "sparrow", "cypress" or "Brussels sprouts" is with a "Do you mean ...?" and a translation. Teaching sentences like this and "How do you say ... in Spanish?" at least means that most of what they say will be in English. If you don't want to lose your status as the English-only speaker, you can let one or all the students check in their dictionaries or school dictionaries at that point (but only when you say so).
4. They want a translation for something so they can easily write down what it means in their notebooks
Despite the speed and convenience of doing this, if you want the students to stop translating in their heads and to make the classroom more and more L1-free it is best to avoid this whenever you can do so without wasting too much classroom time and effort. The best solution is to write something on the board they can copy down that is almost as short and easy to understand as a translation, e.g. an easy synonym, a word with a similar meaning (with a wavy equals sign to mean "almost equals"), an opposite, two words it lies between (e.g. "quite" between "very" and "a bit"), a different part of speech of the same word that they are more familiar with (e.g. "character" for "characterization"), or a simple line drawing.
5. There are things they need to say to each other to be polite that they don't know how to say in English
This can be easily and usefully solved by teaching "Good morning", "Did you have a good weekend?", "See you next week" etc. from the first lesson. It might be that they want to say something that doesn't have a perfect English translation, but until they reach the level when you can explain that to them, it can sometimes be worth teaching them the less than perfect equivalent.
6. Speaking English has tired them out and they need a bit of a break
Like doing exercise, with language learning sometimes taking a break and starting again refreshed is the best way of using five or ten minutes. In order to give them a break but stop those few minutes of L1 infecting the whole class, you could have a set break time when they can speak L1, do something silent for 5 minutes, or do some very basic revision.
7. They feel like a child or stupid when they speak their low level English for too long
This is particularly the case with intellectual students who suddenly can't explain any of the things they want to say. Apart from giving them a 5 minute break to speak in L1, other approaches include telling them what the topic will be in the next lesson so they can prepare what they want to say, designing the syllabus around things they are having trouble expressing (e.g. "I strongly disagree"), and designing activities where they can make their opinions heard with just simple language, e.g. debating games.
8. They want to talk about something that is important for learning English like self-study tips
There are times when a good tip just can't be given in easily understandable English. If you don't speak the students' L1 or want to remain an English-only speaker in class so they are forced to make the effort to communicate with you, there are ways around this. One possibility is to have a standardized list of self-study tips with translations of each one that you can circle individualized recommendations on. Another is to spend a lesson or two on the topic until you have pre-taught all the language they will need to understand the tips.
9. They have got so carried away with a debate or other speaking activity that they can't bear not being able to get their point across
In a way this is the sign of a good class, and a comment or two in L1 doesn't hurt, especially if other students can translate it. In the worst cases, though, the rest of the class can turn into a mainly L1 debate. The best way to avoid this is to have the language at least as much the focus of the activity as the debating point, e.g. by having example sentences they must try and slip onto the discussion to score points. Another good technique is to split the debate down into several smaller sections such as statements to agree and disagree with. You can then bring the discussion back into English by moving onto reading or listening to the next statement.
10. They have tried to explain something in English for five minutes when they know they could just get a translation from the teacher or students in 5 seconds
Learning to explain vocabulary you don't know and making the point that it is possible to communicate in only English are very useful, but there reaches a point where an English-only policy can just waste time. Ways of reducing that length of time and the number of occasions when you do need to resort to L1 include allowing dictionary use at designated points, allowing them to draw on the board, allowing them to show photos of what they are talking about on the mobile phones, and having the Internet in the room so they can search for a picture.
11. They want to know how to say something in English but they can't ask in English
Similar to number 3 above, solutions include the use of dictionaries and teaching them set phrases like "What is the English translation of...?"
12. They want to talk about something that only exists in their own country and so doesn't have an English name, e.g. a vegetable, bird or something related to a local festival
Teach them set phrases such as "There is a bird that in my language we call a ..., which is ..." or "I don't think there is a word in English for ..., but it looks like..." Games like Taboo and work on relative clauses for descriptions can help with this.
Why your students speak L1 in class
Some reasons why students speak their own language in English classes