Well that depends on what are you planning to do... Overall moving the spy is bad cause when it moves it does not work. So usually you want to keep your spy in a capital of Tradition player, or some other capital with lots of yields and significant tech advantage over you (like Korea or Maya). On the other hand keeping the Spy in one capital for a long time hurts this player A LOT. Even on Deity this player usually will be behind you, so another strategy is to spy on your neighbour, build army and capture him. With a spy it can be MUCH easier. And don't forget that you can keep it in the City-State, sometimes it can be a good idea (progress+cultural CS, or when you want a religion and have religious CS).