Where does the energy for repulsion in charges come from? If I bring together 2 objects with the same charge, they repel. But even after the repulsion has taken place, there is no loss of charge in the objects. Where does the energy come from then?
 A: An object situated within the gravitational field of the Earth experiences an attraction toward the Earth's center of mass. Raising an object above the Earth's surface (ie. increasing the distance of the object from Earth's center of mass) increases the object's "potential energy." Once you let go of the object, that potential energy is converted to kinetic energy as the object accelerates back down to Earth (conservation of energy).
The solution to your question is similar to this example, but it involves a different kind of potential energy. Rather than a gravitational potential caused by the object "wanting" to fall toward the center of the Earth (but being prevented from doing so), particles of like charge located near one another "want" to repel. If they are somehow prevented from doing so, they too will possess a potential energy called electrostatic potential.
Electrostatic potential is due to the repulsive property of electromagnetism when dealing with particles of like charge (as opposed to the attractive property of gravity in the previous example) which increases as the distance between these particles is decreased. If the particles are no longer restricted, their electrical potential energy will be converted to kinetic energy and the particles will move rapidly away from one another. The energy that causes the particles to repel doesn't "come from" anywhere, it simply changes state from potential energy to kinetic. 
Hope this helps answer your question. If you want a more specific/mathematical explanation, I suggest googling "Coulomb's Law"
A: The repulsion between any 2 charged bodies is always there. There is no such thing as repulsion has taken place. It is an observed effect in physics and is always there so long as the charges are present in a close proximity. This observation called for a logically consistent explanation, which led to the discovery of maxwell's laws and classical electrodynamics. 
A Question like where does this energy come from does not have satisfactory answer within the scope of physics. It is meaningful to ask IMHO, How do we know that there is energy in the repulsion between 2 charged bodies? This energy can be converted into other forms such as performing mechanical work, using an appropriate device. Or vice verse one can use energy stored in other forms to bring charges closer. 
A: The short answer is that the energy belongs to the geometry of the charges, not the charges.  When the geometry changes, the energy changes, and the lost potential energy gets converted to kinetic energy.
