According to Scripture and as Wesrock noted, the bad angels sinned in heaven or the heavens. Jesus even says that he saw Satan fall like lightening from heaven. And in the book of Revelation, St Michael the archangel and his army of good angels kicked out the bad angels from heaven and threw them down to the earth. The garden of Eden where God placed our first parents, namely, Adam and Eve, is on the earth. Apparently than, the rebellion of the angels did not occur in the Garden of Eden and most likely occurred before God had created and planted the Garden of Eden which according to the Genesis 1-2 creation narratives was not made immediately or in God’s initial act of creation such as in Gen. 1:1 ‘In the beginning, God created the heavens and the earth’. The devil had already fallen by the time he had tempted Eve in the garden of Eden under the form of a snake or serpent.
The Church officially teaches that the angels were created together with the corporeal creation at the beginning of time. And Scripture speaks of the devil sinning from the beginning:
‘He who commits sin is of the devil; for the devil has sinned from the beginning’ (1 John 3:8).
Jesus says ‘You are of your father the devil, and your will is to do your father’s desires. He was a murderer from the beginning’ (John 8: 44).
We could probably find other similar passages in the Bible. So, the Church teaches that the angels were created in the beginning simultaneously with the beginning of the creation of the corporeal/physical world such as it is written in Gen. 1:1 ‘In the beginning, God created the heavens and the earth’. I don’t believe the Church has officially taught whether the bad angels sinned immediately after their creation or possibly some lapse of time after their creation. At any rate, it was either immediately or sometime in the beginnings of the universe or creation. St Thomas Aquinas teaches that the angels either merited heaven or hell immediately following their creation.
As far as what did the sin consist in by which the bad angels fell, theologians generally invoke pride according to Sirach 10:13 ‘For pride is the beginning of sin’.