A dehumidifier will help to dry out your bathroom, which will reduce the ambient moisture that mold needs to live on. The musty smell will still linger until you have removed any existing mold and practice good bathroom hygiene.