For an arc subtending any general angle $\alpha$ at the center, the electric field is $E = \frac{\lambda}{2\pi\epsilon_0 r} \sin\left(\frac{\alpha}{2}\right)$. For a semicircle, $\alpha = \pi$, so $\sin(\pi/2) = 1$, giving the simplified result immediately.