The Wikipedia article says it appeared in The Knickerbocker magazine in 1847, but offers little in the way of explaining it's spread throughout pop culture.
Folk sayings and the origins of colloquialisms are notoriously hard to know the history of - many of the reasons why they became popular have been lost to time either because people either didn't record them, or because the records have become lost. It could be that the joke was originally the catchphrase of a popular comedian, or that it spread in playgrounds, or that it comes from a magazine or newspaper that is no longer extant, or at least no longer easy to find. Trying to figure out the origin of such a joke is probably like trying to figure out the origin of some modern dank meme with access only to the archives of the New York Times - I mean, the New York Times has probably discussed Pepe by now because of politics, but would they have bothered discussing those six panel "what I do" "what I think do" "what my parents think I do" (etc) memes? Probably not.
Nonetheless, if you look at the phrase 'chicken cross the road' on Google ngrams, there is a spike circa the 1850s, which doesn't show up in search for me, but which could be a version of a quote from an 1848 edition of The Knickerbocker:
"There are ‘quips and quillets’ which seem actual conundrums, but yet are none. Of such is this: ‘Why does a chicken cross the street?' Are you ‘out of town?’ Do you ‘give it up?’ Well, then: ‘Because it wants to get on the other side!’"
There's a variant of the joke in an 1872 edition of the Sydney Mail, which was a now discontinued weekly edition of the Sydney Morning Herald, which the website of an etymologist, Barry Popik, suggests may have first come from the San Francisco Bulletin:
Why should not a chicken cross the road? It would be a fowl proceeding.
Google ngrams suggests that the early 20th century is when references to the joke start noticeably increasing. One reason for this, perhaps, is that early automobile drivers had a genuine problem with chickens crossing the road when their cars came nearby. I get the sense reading the snippets that the writers mentioning these issues are bemused about the pre-existing joke.
Take a reference in the early automobile trade magazine The Horseless Age, which has a 1905 article saying that:
A cash prize is now being offered for the correct solution of the question, "Why does a chicken cross the road?" and its practical application. The prize is offered by a French automobilist to the French agricultural societies for a breed of chickens which will not cross the road every time an automobilist approaches
Similarly, American Hay, Flour And Feed Journal in 1912 has someone complaining that:
Autos shoot all over the Corn Belt during July to September and furnish the chickens with a daily life gamble. You understand the saying, 'Why does a Chicken cross the Road' for the first time after a few country trips. The chicken will be perfectly safe on one side of the road, but he will be alarmed and seized with a desire to flap over to the other side right in front of your machine.
On a different tack, Life magazine, in 1912, also mentions the question with a much more obviously satirical tone, presumably making fun of the Bourbon Democrats of the time:
...a question which has puzzled the economists and biologists for decades. The resolution which was introduced by Congressman Bourbon, is as follows:
Resolved, That an international commission be formed to investigate the question: 'Why does a chicken cross the road?' and be it further
Resolved, That said commission be fully empowered to dig as deeply into the matter as possible.
Elsewhere in the early 20th century, The Gideon in 1914 calls it an 'ancient conundrum', while a writer in The American Angler in 1921 complains about 'an occasional crazy chicken' on the road while driving, again prompting said ancient conundrum.
These quotes all, I suspect, suggest that the joke is quite well known at this point in America, without furnishing much clue of how exactly it spread. Perhaps The Knickerbocker really was the first to use it, but the subtext of that quote does seem to be that the joke was already well-known at the time.
Given the context of a lot of these early quotes, it might be that the joke particularly gained popularity because of the rise of automobiles (or that Google's corpus of books is quite possibly missing several 1800s references to the joke). Chickens being interrupted by a loud, fast moving, vehicle clearly evoked a sort of 'fight-or-flight' response, and it seems that the nature of their flight response was not particularly good for the chicken's health in the age of the automobile.
Perhaps this also somewhat explains the point of the joke, which might have been lost on the writer from the Knickerbocker: chickens apparently did seem to be crossing the road mostly to get themselves killed and thus find themselves in another plane of existence: 'the other side'.