Nucleophilicity
Because smaller anions are very well solvated in polar protic solvents, such as water and methanol, iodide is a very good nucleophile:
$$
\textbf{Polar Protic Solvents}\\
\begin{align}
\text{Solvation: }& \ce{I- < Cl- < Br- < F-}\\
\text{Nucleophilicity: }& \ce{I- > Cl- > Br- > F-}
\end{align}
$$
For polar aprotic solvents such as DMSO, DMF, and acetonitrile that do not solvate anions nearly as well and the cations, still, to an appreciable extent, the order of nucleophilicity reverses:
$$
\textbf{Polar Aprotic Solvents}\\
\begin{align}
\text{Solvation: }& \ce{I- > Cl- > Br- > F-}\\
\text{Nucleophilicity: }& \ce{I- < Cl- < Br- < F-}
\end{align}
$$
Leaving Group Tendency
Leaving group tendency is largely decided on the basicity of the group. Less basic groups make better leaving groups. Thus, order of leaving group tendency follows the same trend in any solvent.
$$
\begin{align}
\text{Basicity: }& \ce{I- < Cl- < Br- < F-}\\
\text{Leaving Group Tendency: }& \ce{I- > Cl- > Br- > F-}
\end{align}
$$
References
- Solomons T. W. G., Fryhle C. B. (2011). Organic Chemistry, 10th ed. John Wiley & Sons.
- LibreTexts Chemistry: Nucleophilicity and Solvent Effects