I've done the only work on this phrase, most often applied to New York City but sometimes to other places as well.
9 June 1910, New York (NY) Times, pg. 7:
"New York is a nice place to visit, but you couldn't hold me there with a two-inch rope. There isn't enough breathing room."
(Said by Captain "Jack" Abernathy. It now looks like he coined the original phrase. I'll have a hard time beating 1910. I had known previously that the phrase was at least popularized during the 1939-1940 World's Fair—ed.)
27 September 1911, Fort Worth (TX) Star-Telegram, pg. 6, col. 3:
"A GOOD CITY TO VISIT."
"New York is a good city to visit once in a while, but it is a mighty poor city to grow up in," said William H. Warren, a prosperous fruit raiser of Missoula, Mont., who, after forty years' absence, has come back to see his married daughter and revisit the scenes of his boyhood.
-- New York World.
29 November 1930, New York (NY) Times, pg. 23:
On the program title page he quotes an old saying: "New York is a nice place to visit, but I wouldn't live there if you gave me the place," which really has very little to do with the play.
(The famous critic J. Brooks Atkinson, reviewing the comedy THIS IS NEW YORK by Robert E. Sherwood—ed.)