Speaking of the Newel K. Whitney Store in Kirtland, Ohio in the early days of the Church in 1833, Brigham Young recalled,
When [the brethren] assembled together in this room after breakfast, the first they did was to light their pipes, and, while smoking, talk about the great things of the kingdom. … Often when the Prophet entered the room to give the school instructions he would find himself in a cloud of tobacco smoke. This, and the complaints of his wife at having to clean so filthy a floor [from chewing tobacco], made the Prophet think upon the matter, and he inquired of the Lord relating to the conduct of the elders in using tobacco, and the revelation known as the Word of Wisdom was the result of his inquiry. (Deseret News: Semi-Weekly, Feb. 25, 1868, p. 2).
The Word of Wisdom was received on 27 February 1833. In it the Lord states, "That inasmuch as any man drinketh wine or strong drink among you, behold it is not good, neither meet in the sight of your Father (D&C 89:5)". Later, it states, "And again, hot drinks are not for the body or belly (D&C 89:9). The term "hot drinks" was defined both by President Joseph Smith, and his brother Assistant President Hyrum Smith. President Joseph Smith said, "Tea and Coffee . . . are what the Lord meant when He said 'hot drinks'" (Voice from the Mountains [Salt Lake City: Juvenile Instructor Office, 1881], p. 12.). Assistant President Hyrum Smith said, "There are many who wonder what this can mean. . . . I say it does refer to tea and coffee" (Times and Seasons, 1 June 1842, p. 800).
The Word of Wisdom is a true principle. I know the voice of the Lord is in it. I have heard people say God gave no "why" in the Word of Wisdom (or other revelations). True followers of the Savior need no "why", because just as Joseph Smith once said, when the Lord commands, do it! (History of the Church, 2:170) This is my testimony, set in order to clarify misconceptions. In the name of Jesus Christ, Amen.