Praise be to Allah.
Imitating means trying to be like someone, which the
fuqahaa' understand to mean being similar in a certain way to the person whom one is
imitating. The Muslim is not permitted to imitate the kuffaar by wearing clothing that is
unique to them and for which they are known, like the belt worn by Christian monks, or the
distinctive headgear of Magians (Zoroastrians) and Jews, because of the hadeeth of the
(peace and blessings of Allaah be upon him): "Whoever imitates a people is
one of them." (Reported by Abu Dawood, 4/314).
The scholars have specified that the prohibition of imitation applies in two cases:
1. Where what is imitated is clothing that is characteristic of the kuffaar, not things that are worn by others too or things that used to be distinct to them but have now become widespread among other groups too - like the jeans referred to in the question.
2. When the act of imitation happens at a time when the clothing in question is characteristic of the kuffaar. This is because al-Haafiz Ibn Hajar (may Allaah have mercy on him) reported that Anas (may Allaah be pleased with him) saw some people wearing shawl-like garments over their heads and shoulders, and said, "They look like the Jews of Khaybar." Ibn Hajar commented: "This could be used as evidence that this kind of garment was characteristic of the Jews at that time, but this is no longer the case, so that garment is now counted as something that is in general permitted." (Fath al-Baari, 10/275).
The scholars also made an exception concerning Muslims wearing the distinctive clothes of the kuffaar when living in daar al-harb (non-Muslim countries which are at war with Muslims) or for purposes which will benefit the Muslims. Shaykh al-Islaam Ibn Taymiyah (may Allaah have mercy on him) said:
"When a Muslim is living in a non-Muslim land (whether or not it is hostile to Islam), he is not expected to differ from them (the kuffaar) in his outward appearance, because of the harm that may result (from dressing as a Muslim). It is preferable, even obligatory, for a man to look like them sometimes, if that will achieve some religious purpose such as calling them to Islam, finding out their secrets in order to tell the Muslims about them, repelling their harm from the Muslims, and other worthwhile aims. But in the Muslim lands where Allaah has caused His religion to prevail, and where the kuffaar are in an inferior position and are paying jizyah (taxes paid by non-Muslims living under an Islamic government), it is obligatory for Muslims to look different from the kuffaar." (Iqtidaa' al-Siraat al-Mustaqeem, 1/418).
It is clear from the above that jeans are not clothes that are characteristic of the kuffaar or worn only by them, so they are not haraam. However, it is more befitting for the Muslim to try to wear distinctive Islamic dress wherever he is, in obedience to the way of the Prophet (peace and blessings of Allaah be upon him). The Muslim should feel in his heart that he hates the kuffaar and the way they look and behave. This hatred will motivate him to avoid looking like them at all in the way he dresses or in other ways. Do you not see that a person who despises a people or tribe, or people from a certain country, will hate to dress like them, especially if they are poor. As Shaykh al-Islam (Ibn Taymiyah) said: "Looking like them in external appearance indicates that one loves them in one's heart, and vice versa." And Allaah knows best.