The date of the first application of a pickup to a guitar is uncertain but Loyd Loar who worked for Gibson from 1920 to 1924 (and is famous for his mandolins and arch tops) developed a pickup. The company developed a bunch of prototypes which were not accepted by the "agents" (who I believe sold to the retailers). Vivi-Tone was founded by Loar and two other folks from Gibson - however they were too far ahead of the curve and there was no market.
Walter Fuller recalled that when he joined Gibson in 1933, he found some pickups that he believed were made ten years earlier under Loar's supervision. They were more like microphones than modern day pickups with a fixed anode and a charged, stretched diaphragm. It was not a successful design.
Commercially successful electric instruments began to appear in the 1930s. In 1931 Rickenbacher (that's a correct spelling for the era) produced a Hawaiian guitar that came to be known as the "Frying Pan". It was the first instrument to use a modern style electromagnetic pickup which, in addition to ten years of market simmering, might explain its success.
Rickenbacher was not alone - Rowe-DeArmond had started producing pickups early in the decade and Dobro produced a small number of amplified resonator guitars in 1932.
While the Hawaiian guitars were solid from the start, the electric "Spanish" guitars of the time were mostly arch tops with a pickup stuck on them. Various global events were pulling attention away from guitar manufacturing. As a result the electric guitar did not begin to become well known until the late 30s when Charlie Christian and Benny Goodman's band brought Gibson's ES-150 to the masses. (Note that "ES" stands for Electric Spanish).
The Second World War continued to hamper development because people with manufacturing skills were pressed into service.
Les Paul (born in 1916) had experimented with his own pickups as early as 1929. He was certain that making a stiffer instrument, keeping the pickup in place and allowing the strings to move was the way to go and so started working toward solid instruments.
He had John D'Angelico put a soundpost or block inside an instrument for him to keep the top still, and in 1937 commissioned an instrument from Larson Bros. of Chicago with a heavy solid top and no sound holes. A short while later he experimented with "The Log", essentially a railroad tie, where he stuck the bouts of the guitar to the plank which contained everything else. He built this at Epiphone's New York factory in 1941.