A Muslim should certainly not go to places like bars and nightclubs which are dedicated primarily to unlawful activities.
The Prophet (peace be upon him) said: “He who believes in Allah and the Last Day, let him not sit at a table where liquor is served.” [Sunan al-Tirmidhî (2801)]
Restaurants and reputable hotels are a different matter. If a restaurant, convenience store, or similar establishment is engaged primarily in lawful business, but also serves alcohol to its customers who order it, then as long as the Muslim does not eat or drink unlawful things or sit at a table where unlawful food or drink is served, then he is not sinful. If other restaurants are available that do not serve alcohol, he may prefer to patronize them rather than support a venue that sells unlawful things. And Allah knows best.
The hadîth reads: “He who believes in Allah and the Last Day, let him not sit at a table where liquor is served.” It is talking about what is put on the table where the person is sitting. It also applies to being in the social company of drinkers while they are engaged in their wrongdoing. Therefore, a Muslim who sits at a table where liquor is being served or consumed is doing wrong. The ruling will be extended to the entire venue when it is a place dedicated to social wrongdoing, like a bar or nightclub. This is because in such venues the person is socially participating in the activity of drinking, even if he is not actually sitting at the same table.
On the other hand, if a person sits in a normal restaurant at a table where only lawful items are being served, and there is a table nearby – unaffiliated in any way with him or his companions – where liquor is being consumed, then he is not sinful if he at least denies that wrongdoing in his heart or by his speech.
This practice can readily be adopted in the restaurants were Muslims and non-Muslims both attend, especially in the countries where Muslims are minorities.
With respect to a Muslim businessman who engages in legitimate business in a country where attending lunches and dinners in restaurants and hotels are an unavoidable part of doing business, and where the other parties to the business transaction almost invariably drink alcohol, this can become a matter of legal necessity (darûrah shar`iyyah).
This will be the case if the general refusal of Muslims to sit at a table where the other party drinks alcohol makes it impossible or extremely difficult for religious Muslims in that country to engage in lawful business. This brings a serious harm upon the Muslims, a harm that Islamic Law would seek to avoid.
Moreover, the prohibition of sitting with people who drink alcohol is a prohibition regarding the means to wrongdoing. This can be contrasted with the prohibition of drinking alcohol, which is a prohibited for its own sake. Ibn al-Qayyim explains: “Prohibitions regarding the means to wrongdoing are not like things that are prohibited for their own sake. Prohibitions regarding the means to wrongdoing will be lifted for a valid need (hâjah). As for things that are prohibited for their own sake, their prohibition is not lifted except in cases of dire necessity (darûrah).”
Therefore, a Muslim businessman can sit with people in a respectable business context where the other person is drinking alcohol. The Muslim may sit in such company to the extent that it is necessary for him to conduct normal, lawful, and respectable business. Of course, under no circumstances may the Muslim partake of unlawful food or drink. The Muslim should also endeavor to insist that the meeting takes place at a reputable and respectable restaurant, and not at a bar or nightclub.
And Allah knows best.