First, calculate the number of moles of NaOH:
\[
\text{Moles of NaOH} = \frac{\text{Mass}}{\text{Molar mass}} = \frac{8.0 \, \text{g}}{40 \, \text{g/mol}} = 0.2 \, \text{mol}
\]
Next, calculate the molarity of the solution using the formula:
\[
\text{Molarity} = \frac{\text{Moles of solute}}{\text{Volume of solution in liters}} = \frac{0.2 \, \text{mol}}{2.0 \, \text{L}} = 0.10 \, \text{M}
\]
Thus, the molarity of the solution is \( 0.10 \, \text{M} \).