The discovery was made quite accidentally. Two teams of astronomers were measuring the brightness of very distinct Type 1a supernovae. These stellar explosions are among the brightest events in the universe, which makes them an ideal tool for determining their distances. The light from a Type 1a supernova follows a predictable path, always peaking at the same level of brightness. The light itself has a specific attribute. Its intensity varies inversely (oppositely) with the square of the distance between the source such as a supernova and the surface such as a telescope’s mirror.
In other words, if the distance increases, the illumination decreases by the square of the distance. To cite an example, if a surface that receives 1 lux of light at a distance of 1 meter from the source is moved 2 meters from the source, that surface will receive 1/4 lux of light. Astronomers, who were using supernovae as ‘standard candles’ discovered that every remote Type 1a supernovae were significantly fainter than they should have been, based on their distances estimated using other techniques. This meant that these supernovae were farther away than originally thought, so the implication was that the rate of expansion of the universe must be accelerating.
We don’t know that exactly is the repulsive force that is causing the universe to expand, so it has been called dark energy, and yet astronomers are totally in the dark about its physical nature.