The problem involves calculating the work done in rotating an electric dipole within a uniform electric field. An electric dipole consists of two equal and opposite charges separated by a distance, and the dipole moment $\vec{p}$ is a vector quantity pointing from the negative to the positive charge. When placed in a uniform electric field $\vec{E}$, the dipole experiences a torque that tends to align it with the field.
The potential energy $U$ of an electric dipole in a uniform electric field is given by the formula:
$$U = -\vec{p} \cdot \vec{E} = -pE \cos \theta$$
where:
Initially, the dipole is aligned with the field, so $\theta = 0^{\circ}$. The initial potential energy $U_i$ is:
$$U_i = -pE \cos 0^{\circ} = -pE$$
Finally, the dipole is rotated to be perpendicular to the field, making $\theta = 90^{\circ}$. The final potential energy $U_f$ is:
$$U_f = -pE \cos 90^{\circ} = 0$$
The work done $W$ in rotating the dipole is equal to the change in potential energy:
$$W = U_f - U_i$$
Substituting the values of initial and final potential energies, we have:
$$W = 0 - (-pE) = pE$$
Therefore, the work done in rotating the dipole by $90^{\circ}$ is $pE$.
Conclusion: The correct answer is $pE$.