All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Growing long fingernails is against the Sunnah of the Messenger of Allaah, sallallaahu ‘alayhi wa sallam. It was narrated that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, said: "Five are among the acts of fitrah (natural disposition): circumcision, shaving pubic hair, plucking out armpit hair, cutting one's nails and trimming one's mustache." [Al-Bukhari and Muslim]
Removing these things is one of merits of Islam, which is a religion that encourages cleanliness, purity, discipline and hygiene. Thus, a Muslim would appear in the best way and the most beautiful image. Islam enjoins only what is nice and forbids only what is ugly. It is recommended to cut nails once every week, and it is impermissible to let them grow for more than forty days, regardless of the husband's desire. Anas said: "The Prophet, sallallaahu ‘alayhi wa sallam, fixed a deadline for us for cutting the nails, plucking out the armpit hair and shaving the pubic hair (he ordered us) not to leave any of those more than 40 days." [Ahmad, Abu Daawood and others]
Hence, it is permissible to let nails grow as long as they do not hold any impurities which invalidate the prayer and do not exceed a period of forty days.
Allaah Knows best.