While we don't know exactly, this concerto was probably written in the 1730's. It's melody was probably originally written for another instrument. During this period, Bach served as Capellmeister at the Court of Prince Leopold of Anhalt-Cöthen (1717-1723) While much of Bach's writing was centered on sacred music, this his responsibilities at Cöthen were predominantly secular. Prince Leopold had a small kingdom of only 5,000 subjects, but he had a great love for music . As a teen, he convinced his mother to start hiring a musical staff with whom he could play music and by the time he took the throne, his "staff" had grown in size to a chamber orchestra. Friedrich Wilhelm I, the King of Prussia had re-allocated his resources to focus more on military and there were many newly unemployed musicians available raising the quality of Leopold's ensemble.
This is probably the most joyous of Bach's concertos. Since the keyboard of the day was unable to sustain notes, Bach placed elaborate embellishments.