As the term suggests, the Byronic hero's origins lie in the life and work of the Romantic poet Lord George Gordon Byron. Byron's life was short, tumultuous, and controversial; he flouted 19th-century sexual norms by engaging in multiple high-profile affairs (likely with both women and men), brought a pet bear with him to college, and then died at the age of 36 while participating in the Greek struggle for independence. He thus gained a reputation for passion, rebelliousness, and even recklessness. A jilted lover, Lady Caroline Lamb, famously described him as "mad, bad, and dangerous to know." Her description is not entirely unfair, as he to some extent purposefully cultivated that air during his lifetime. For instance, in his narrative poem Childe Harold's Pilgrimage, the protagonist—a disillusioned young man searching for a purpose on which to expend his considerable intelligence and energy—is an idealized version of Byron himself.
Childe Harold, then, offers the first example of what we now call the "Byronic hero": He is a character, traditionally male, who is brilliant, charismatic, and deeply feeling. At the same time, he also tends towards pride and moodiness. Struggles with a conservative and conformist society give him a jaded mindset.
In this sense, the figure is inseparable not only from Lord Byron, but from the broader literary and cultural moment to which he belonged. The Romanticism of the late 18th and early 19th centuries was in many ways a response to the preceding Age of Enlightenment. Romanticism moved towards prioritizing emotion over reason and nature over technological innovation. Because much of society did the opposite, this laid the groundwork for the Byronic hero's rejection of society.
Because of its interest in self-expression and the value of individual subjective experience, Romanticism was also bound up in revolutionary political movements that challenged longstanding social hierarchies and championed liberty and equality. Most notably, Romantics supported the French Revolution. However, where the first generation of British Romantic writers like Samuel Taylor Coleridge had been inspired by the Revolution's promise, the second generation, including Byron himself, was forced to grapple with the Revolution's failures and ultimate defeat. This pervasive sense of political disillusionment helps explain the rise of Byronic figures who are deeply critical of society, but who largely despair of ever changing it.
With all that said, it's interesting to note that some of the most familiar examples of Byronic heroes come not from the Romantic Era, but from the later 19th century. Heathcliff in Emilly Brontë's Wuthering Heights, Edward Rochester in Charlotte Brontë's Jane Eyre, and Edmond Dantes from Alexandre Dumas's The Count of Monte Cristo are all examples of the Byronic hero. The idea of a passionate but troubled man at odds with the stifling expectations of society clearly has long-lasting appeal.