Definition: ABY stands for "After the Battle of Yavin," while BBY stands for "Before the Battle of Yavin." In this battle, which took place at the end of A New Hope, the Rebel Alliance destroyed the First Death Star near their base on Yavin 4. This marked one of the first major successes for the Rebel Alliance and foreshadowed the downfall of the Empire.
The terms ABY and BBY were first used by fans as a convenient dating system for events in the Expanded Universe. The Battle of Yavin takes place in 0 BBY, with years before it (BBY) counted backwards and years after it (ABY) counted forwards, just like dates in B.C. and A.D.
In-Universe: The BBY/ABY system was used by the New Republic, the government formed by the Rebel Alliance after they overthrew the Empire. Other cultures and political entities had their own calendars based on important events. For example, some Jedi historians used the terms BTC and ATC to refer to years before and after the Treaty of Coruscant, which ended the Great Galactic War in 3,653 BBY.