Muslims are encouraged to join non-Muslim political parties and take part in elections. This is part of the Islamic duty to command that which is good and forbid that which is evil. Moreover, Muslims should elect candidates who uphold the values or principles they cherish dearly; so if they find a candidate who is upholding all of the values or principles that they cherish, then they should support him.
Dr. Salah Sultan, President of the American Center for Islamic Research, Columbus, Ohio, and member of the European Council for Fatwa and Research, states the following: Actually, I have a book on that topic where I gathered the fatwas of fiqh councils and many fatwas by great scholars, where I concluded that it is wajib or obligatory upon Muslims to participate in elections with certain guidelines, regulations, and rules.
The basic rule in Islam is that a Muslim is beneficial to others. The Prophet (peace and blessings be upon him) is reported to have said, “The best of Muslims is the one who is most beneficial to others.”
So a Muslim should participate in any party that works for the well-being of the society in which he lives. However, the Muslim is not allowed to participate in any party that calls for anything that clashes with the teachings of Islam. For example, if there is a party that calls for depriving Muslim sisters of wearing their Hijab, for example, it is haram to join it.