Not really a prank, but an exchange of insults. Winston Churchill received a telegram from George Bernard Shaw, inviting him to his new play:
"Two tickets reserved for you, first night Pygmalion. Bring a friend. If you have one."
Churchill replied: "Cannot make first night. Will come to second night, if you have one."
The New York Times had a good article published in 2006 that contains a number of amusing telegrams, largely collected from the book "Telegram!" by Linda Rosenkrantz. A few favourites are:
Western Union charged by the word, turning the loquacious terse, and sometimes ambiguous. A reporter asked the actor Cary Grant about his age.
HOW OLD CARY GRANT?
The actor supposedly replied:
OLD CARY GRANT FINE. HOW YOU?
And
Both Mark Twain and Arthur Conan Doyle supposedly sent similar telegrams to a dozen prominent men, all of whom packed up and left town immediately.
FLEE AT ONCE — ALL IS DISCOVERED.
I don't know about prank pigeons, but you can read about pranks and other surprising uses for the telegraph in The Victorian Internet by Tom Standage. Hazing of new operators was very common, for instance. He also tracks such milestones as the first 'online' wedding of two telegraph operators (1860s, if I recall).
This is not entirely what you're looking for, but in the days of punch card computers, a card with all of its holes punched out (a "lace card" ) would be used to prank users by completely mucking up a computer halfway through a stack. Similarly, people would perform a pre-internet DDoS attack on fax machines by faxing in completely black documents, called a "Black Fax", creatively enough. This would use up all of the expensive toner in the machine, making it useless until it could be refilled. When machines got smart enough to include filters, pranksters invented computer programs that would auto-generate a several hundred page long document of highly compressed characters, giving the same effect as black page but could slip past filters.
Naval signalling has a long tradition of this sort of thing. My personal favourite is that when the liner RMS Queen Elizabeth and the battleship HMS Queen Elizabeth were sailing in company, the latter signalled "SNAP" to the former.
The classic reference for such tales is Jack Broome's "Make a Signal", though of course disentangling the genuine from the apocryphal is rather challenging.