Frederick Guthrie invented the diode in 1873, but did not put it into practical use. Thomas Edison independently developed it in 1880, then used it in his 1883 patent of the incandescent light bulb. John Ambrose Fleming received the first patent on the diode itself in 1904.
All of these early diodes were vacuum tube diodes. The vacuum tube diode was the most common form until the 1950s, when semiconductor diodes supplanted them. Semiconductor diodes were invented shortly after vacuum tube diodes, but were not stable enough for practical use until the mid-20th century. Karl Ferdinand Braun invented the first semiconductor diode in 1874 and patented it in 1899.