When the dipole (its moment) is perpendicular to the electric field, they are on the same equipotential line. So the net work done to bring them from infinity to their places is qV+(-q)V = 0$qV+(-q)V = 0$ (without considering their electrostatic interaction with each other). So, it is convenient to choose this orientation as zero potential energy. Also, the potential energy formula gives a nicer formula with this setup. But again you can choose any orientation as your reference point.