Despite sounding like part of a conspiracy theory, this pigeon myth is actually rooted in a measure of truth. Pigeons have been used by governments and militaries around the globe for centuries, and many pigeon activities have proved quite critical in espionage operations. For example, before the widespread use of satellite imagery, pigeons would be fitted with tiny cameras and flown over enemy territory on information-gathering exercises.
They've also been used extensively as messengers -- the birds would carry critical notes between military installations even as late as World War II. That being said, it's extremely unlikely that the pigeons you feed at the local park are working undercover for a foreign government.