Einstein initially included the term because he was dissatisfied by the fact that his equations would not allow for a static universe. Gravity would cause a universe which was initially at rest to begin to contract. To counteract the force of gravity, Einstein added the cosmological constant which would produce a repulsive force.
However, this term did not fulfill its intended purpose. First of all, observations by Edwin Hubble indicated that the universe was not at rest but rather was expanding. Second, adding the cosmological constant to Einstein's equations would not lead to a universe at rest because a static universe would still be unstable. A universe at rest which expanded slightly would release the vacuum energy, which would cause more expansion, which would release more energy. Similarly, a universe which contracted slightly would have less energy, which would increase the rate of contraction.
Einstein abandoned the cosmological constant and called it the "biggest blunder" of his life.
The cosmological constant is still of interest, as most grand unified theories predict a non-zero cosmological constant from the energy of quantum vacuum fluctuations. In fact, one theoretical problem in these theories is that the vacuum energy they predict is huge, and would have to be countered by a similarly large negative Λ to avoid an extremely rapidly expanding universe. Some physicists such as Steven Weinberg regard the delicate balance observed as being improbable and best explained by appealing to the anthropic principle.
Moreover, observations suggest that the early universe underwent a period of rapid expansion known as inflation, which can be modelled by assuming a positive cosmological constant. Observations of distance-redshift relations in the late 1990s can be explained by assuming a positive cosmological constant, or some other version of an accelerating universe. As of 2003, the cosmological constant model remains favoured by the observations relative to alternative models which collectively are called quintessence.
The value of the cosmological constant that would explain current observations is on the order of 10-36sec-2. This value of the cosmological constant disturbs theorists who for reasons of symmetry are uncomfortable with an extremely small cosmological constant that is non-zero. Thus the cosmological constant may ironically turn out to be Einstein's greatest prediction.