In 1970 Dylan was awarded an honorary Doctorate of Music from Princeton University. Dylan became very uncomfortable at the event, especially when he was asked to wear a cap and gown. Adding a dramatic biblical flourish, the Princeton campus was in the throes of a locust infestation that day, something the occurs every 17 years.
The song title is a reference to the 1939 novel by American author Nathanel West (1903-40), The Day of the Locust. West had worked for a time in Hollywood as a scriptwriter and the book explores the seamy underside of the American movie industry. The novel's title is thought to be a biblical allusion to certain passages in the Old Testament such as in the Book of Joel 2: 25, "I will restore to you the years that the locust hath eaten."
This has nothing to do with Dylan's song but here's a bit of trivia connected with West's novel. One of the book's characters, the hopelessly clumsy "everyman," is named Homer Simpson. Although it has been suggested that The Simpsons creator Matt Groening called his famous thick-headed, beer-swilling cartoon creation after the character of the same name in The Day of the Locust, he actually named him after his own father.
Honorary degrees are given by academic institutions to honor famous or accomplished people, and generally have nothing to do with the institution itself. They are at best a PR ploy and at worst a farce - something Dylan points out in this song.
As to why Dylan accepted the degree, Tim Riley, in his book Hard Rain: A Dylan Commentary, asserts that Dylan only went through with it so he could write a song about it snubbing academia.