Can you lose your temple recommend if you break the word of wisdom?
Yes you can lose your temple recommend for not following the Word of Wisdom. Obedience to the word of wisdom is required in order to obtain, and maintain, a temple recommend. If it is known that someone is not following the word of wisdom, yet they have a recommend, they can have their recommend taken from them.
Entrance into the temple is a privilege, not a right. On the one hand we want as many people in the temples as often as possible. On the other hand, the temple is the most sacred place on earth. There are standards that must be met before entering such a place, and the word of wisdom is only one of those requirements.
So the next question may be, ‘What does the Word of Wisdom have to do with being worthy of entering the temple?’. The answer comes from the purpose of the Word of Wisdom in general. Our bodies are a precious gift bought by the Atonement of Christ. It is important to take care of our bodies because of that, but also because the condition of our bodies can affect our sensitivity to the Spirit. To use an extreme example, imagine being drunk or high. Can we be sensitive to the gentle promptings of the Holy Ghost in such a state?
While in the temple, we are approaching the presence of Heavenly Father to a greater degree than possibly anywhere else on earth. In such a situation, we must be as personally clean and righteous as possible. The fewer things keeping us from Heavenly Father’s presence, the better. Personal righteousness keeps us spiritually in tune with the Holy Ghost. Physical fitness and health shows gratitude for our bodies, and helps us maintain spiritual sensitivity to the Holy Ghost. Both together bring us closer to Heavenly Father not only in the temple, but regularly through our lives.