How does an electric dipole lose its energy while aligning with a uniform electric field? How does an electric dipole lose its energy while aligning with a uniform electric field: through heat or light?
 A: The potential energy a molecular dipole loses when aligning to an electric field is either converted to rotational kinetic energy in the free dipole which eventuallt converts back to potential energy (oscillation) or it converts into heat when friction with other molecules occurs. The latter is responsible for the microwave heating of water. Some energy might also be converted to emitted EM radiation due to the rotational dipole oscillaton. 
A: You are asking what happens to the work that is done when a dipole rotates into alignment with an applied electric field. In particular whether it emerges in the form of light (more precisely, electromagnetic radiation) or heat (random movement of other molecules).
The answer (as @freecharly says) is that it could be a bit of both; but most commonly we would assume it's lost through EM radiation. Or to be more precise, the energy lost by the dipole takes the form of an oscillating electric and magnetic field disturbance that propagates outwards into the universe.
Alternately you could say that "the dipole emits a photon of the corresponding energy".
A: In an electric field ($\vec{E}$), the electric dipole ($\vec{P}$) experience a torque approximated by $\vec{\tau}=\vec{P}\times \vec{E}$. Due to this torque, the dipole gains angular momentum, which is what the potential energy is converted to when the dipole aligns with the field. 
When the dipole is finally aligned with the fields, instead of stopping it starts oscillating due to the angular velocity it has gained. But there is also a simultaneous loss of energy through radiation, which is because the charges are accelerating while rotating. Thus, the oscillation completely stops after a finite time, because all the energy has been lost through radiation.
To conclude, the energy is lost in  2 ways:


*

*Rotational Energy

*Radiation

A: Electric dipole has different potential energy in different direction in electric field . It has lowest energy in direction of constant electric field because it is most stable there as net force is zero. So if electric dipole aligned in any direction ( having some energy) is aligned in direction of electric field its final potential energy decreases.
A: Isolated dipole
If we talk about an isolated dipole then it will not lose its energy - rather its potential energy would convert into rotational energy, which will then be converted back to the potential energy when the dipole passes the position of its potential minimum. The total energy thus can be written as
$$
E=\frac{I\dot{\theta}^2}{2} - dE\cos\theta,
$$
where $\theta$ is the angle between the dipole moment, $\mathbf{d}$ and the electric field, $\mathbf{E}$; $V(\theta)=-\mathbf{d}\cdot\mathbf{E}=dE\cos\theta$ is the potential energy of the dipole, and $\frac{I\dot{\theta}^2}{2}$ is its rotational kinetic energy. The motion of the dipole is then that of a non-linear oscillator, described by the sine-Gordon-like equation equation
$$
I\ddot{\theta}+dE\sin\theta=0,
$$
which can be analyzed using Floquet theory or linearized for small oscillations (it is identical to the equation of a pendulum).
Dipole in a real world
In most real life situations the oscillations of the dipole will be damped. As a minimum that can be described by introducing the damping term in the oscillator equation above:
$$
I\ddot{\theta}+\gamma I\dot{\theta}+dE\sin\theta=0.
$$
In terms of the more general Bloch equations, which describe magnetic and electric dipoles, the damping coefficient corresponds to the relaxation time $T_1=\gamma^{-1}$.
Energy loss mechanisms
The machanisms leading to the damping depend on the concrete physical situation:

*

*interaction with other dipoles (as, e.g. in Ferroelectric materials)

*radiating photons

*interaction with other surrounding environment: crystal lattice, free electrons in a metal, etc.

Light or heat?
In elementary mechanics one often speaks of heat as anything but the mechanical energy (potential and kinetic terms in my first equation). However, in statistical physics heat is a more specific term, referring to the average energy of microscopic motion. Thus, whether the energy is converted to heat or not does not depend on depend on the specific energy transfer mechanism, but whether the energy becomes diffused between many microscopic degrees of freedom or not. That is conversion to light may be as well conversion to heat - in the form of the black body radiation.
(The OP opposes heat and light: How does an electric dipole lose its energy while aligning with a uniform electric field--through heat or light?)
When discussing ferroelectric or similar phenomena, one usually ignores the specific loss mechanism, assuming that the dipoles, after losing their energy, become oriented along the field. In this case we talk about the energy converted to heat, regardless of what is the transfer mechanism.
