A Muslim is recommended not to render any form of assistance in sin or transgression. If a cab driver has the chance to choose the fares he wants, then, he should be assured that he is not picking or dropping of someone to Haram places.
Sheikh Muhammad Iqbal Nadvi, Imam of Calgary Mosque, Canada, and Former Professor at King Saud Univ., Saudi Arabia, states that: Actually this is a situation that has different scenarios. If a cab driver has the chance to choose the fares he wants, so he has to make sure that he is not picking or dropping off someone to Haram places such as the bar, gambling places, etc. This is based on the fact that it is not allowed for a Muslim to help someone commit a sin, be he a Muslim or non-Muslim.
A different case related to this situation is when a taxi driver is obliged to accept the fares given to him. In this case, he might get a fare to drop off or pick someone from the bar or casino, etc. In my view, this does not fall under the category of Haram, nor does it fall under the “curse” of the Prophet (peace and blessings be upon him) as regards helping someone to drink alcohol. However, this money still has some kind of “Shubha” (doubt) because it is not clean. So, the cab driver is supposed to try as much as he can to take fares to places that do not involve in Haram acts, and if he gets to pick or drop off someone to these places he should make Istighfar (seeking forgiveness from Allah) and give charity to clean his money.