In 286 Diocletian moved the capital of the Western Roman Empire from Rome to Mediolanum. He didn't even stay there, he chose to live at Nicomedia in the east. This would indicate to me that Rome had become a much less important city than it was before. Why?
Diocletian came to power at the end of a very chaotic period in Roman history, the "3rd century crisis." During this time, instability was pervasive and many of the regular functions of the Imperial machinery suffered. The Emperor, more and more, was called away to the northern (German/Danube) frontier, and Diocletian thought it best to divide the empire into distinct districts (the famous Tetrarchy system). Rome was still the cultural and administrative heart of the West, and the Senate (such as it was) still met there, but Mediolanum was a better regional capital for many reasons. It was situated at a confluence of several major road networks serving Italia, Gallia, the Danube frontier, and the routes east around the Adriatic via Ravenna. The port on the Iter river was not as good as the Roman port at Ostia/Portus, but it was good enough and the shipping capacities at Rome had been declining for some time due to lack of regular maintenance and active silting from the Tiber. Mediolanum (apparently) had a booming industrial quarter and soon enough got all the standard monumental buildings: theater, circus, forum, basilica, imperial palaces, etc. Some argue that the city of Rome itself was declining sharply in population towards the end of the 3rd century, but I'm not an expert on that evidence and can't put my hands on any one article about it right now. To be sure, the Rome of roughly a million souls in 1 BC was an unnatural place, and that population required the constant attention of grain shipments and functioning aqueducts. Both those things, some suggest, began to falter and break down in the late 3rd century, at least temporarily, though again our evidence for the period is pretty poor. I was wondering if there were defensive reasons to move to Mediolanum, and it seems the place had a substantial wall, but surely nothing better that what the city of Rome already possessed. Certainly the move to Ravenna sometime later seems to have been defensive in motivation, as the de facto borders of the empire began to unravel.
Edit: I should also add that what we are seeing in the late 3rd century is not necessarily "moving" the capital, but rather decentralization in general. The empire was no longer so much an "empire" ruled by a single, powerful city-state. The identity of "Roman" was severely diluted after the constitutio Antoniniana, when Caracalla made everybody a Roman citizen. A poor cobbler in Londinium was "Roman," and so was a rich merchant in Cyprus, or a Berber herder in the southern fringe of Mauretania. The city of Rome was a relic by 286, filled with monumental buildings and history and culture and the cosmopolitan elite, but very inconvenient as a base for dealing with all the crises at the fringes of the gigantic territory called "Roman." The system of the Tetrarchy, which evolved over Diocletian's reign, was really about breaking that mass into manageable chunks in order to preserve it. Eventually, the two "Augusti" (the senior of the four emperors) would technically be based at Sirmium (Diocletian, in the east) and Mediolanum (Maximian, in the west), while the two junior Caesars worked out of Antioch (Galerius, in the east) and Trier (Constantius, in the west), but there is virtually no evidence to demonstrate this in archaeology. There are "imperial palaces" at other places too, and from what little we know, the emperors were busy all over the place and moving constantly from place to place.
Also: during Constantine's reign, the empire was further subdivided into the twelve dioceses, each with one or two new "capitals" or "centers" for the purposes of minting coins and collecting taxes (and let's be honest: a lot of these reforms were aimed at better collecting taxes in order to pay the much larger army infrastructure instituted by Diocletian and his colleagues). In addition to the old provincial "capitals" (civitates), there were now more or more diocese capitals. What had always been a hierarchy of Rome, then the major provincial capitals (Antioch, Carthage, Alexandria, Leptis Magna, maybe Narbo) had become a much broader "oligarchy" of cities, all of which were now suitable to provide a base for the imperial retinue(s), if only temporarily.
To begin I think it’s important to note that although Rome lost its place as the primary seat of imperial government calling it a lesser city in its own empire isn’t really accurate. Even though smaller than at its height under the Antonines it was still the largest city in the empire by far. The senate, practically powerless as a political institution but staffed with some of the most influential and rich individuals of the empire, was still located at Rome. Its symbolical importance wasn’t diminished either as it was still seen as the center of the res publica romana. So to modify your question a little: why did the emperors of the tetrarchy choose to reside anywhere else but in the first city of the empire?
The answer to this lies in the developments of the so called “crises of the third century” as well as in the way Diocletian wanted to present his new system of governance. The emperors of the third century had been faced with a lot of problems that their predecessors hadn’t really known, at least not in that intensity, and that weren’t easily solvable from Rome. Frequent raids by foreign armies at different frontiers meant that the emperors had to spend a lot of time campaigning in the periphery of the empire to contain those threats. They seldom had the time to return to Rome let alone stay there for a longer period of time. When an emperor died in the provinces there was normally some urgency to find a replacement and no time to wait for the senate in distant Rome to weight in on the matter. The troops on the frontier became the only status group that mattered when it came to who should actually choose a new emperor. This gets more complicated as different parts of the army on different frontiers chose different emperors to deal with their individual local crises. The competing claims of those emperors led to frequent civil wars which again kept them from returning to the capital. So throughout the third century we have a situation in which the emperor spends most of his reign outside the capital and its not even a given the he gets the chance to visit Rome at all.
Diocletian’s tetrarchy was an answer to many of those problems. Four emperors working in tandem had a much easier time dealing with simultaneous problems in the provinces, be they foreign invaders or usurpers against their rule. But that didn’t mean that those problems were just solved immediately and the tetrarchs were still needed in the provinces. They couldn’t afford to rule from central Italy and still had to be on the move constantly. Nevertheless their rule was a lot more stable than that of previous emperors. While the later normally ruled for a few years at best Diocletian spent more than two decades on the throne. This renewed stability gave the tetrarchs the time to further bolster their hold on power by the development of an elaborate court ceremonial. To stage those ceremonies they needed a replacement for the palaces, public spaces and monuments that the city of Rome provided but that they now didn’t often have the time to visit. For that reason the tetrarchs embarked on a massive building program. Cities that were located at strategically important points and therefor frequently visited by one or several of the emperors were embellished with imperial palaces, fora, bathhouses, stadia or victory monuments. This was supposed to make them more similar to the actual capital, Rome. The tetrarchs were using those cities regularly to hold court. Among them are the two you mentioned, Mediolanum and Nicomedia. Its not really accurate to call those residences capitals. They weren’t permanent seats of government but only in use intermittently. A useful comparison might be the Kaiserpfalzen of the medieval HRE. Far from permanently settling at Nicomedia Diocletian regularly held court at other important cities like Antioch at the Orontes or Alexandria in Egypt. The residences weren’t replacing Rome as capital, they were simply substitutes for it as settings for the imperial ceremonial.
The continued symbolic importance which the city of Rome still held was probably even a reason why it couldn’t be used as a seat of government in tetrarchic times. The ideology of the tetrarchs went to great lengths to show all four emperors as roughly equal to each other. If you look at imperial portraits of that era you can see that they are virtually indistinguishable from each other. If one of them would have chosen to permanently settle down at the capital of the empire that would have seriously disrupted the theoretical parity with his colleagues. Rome could only be used as a meeting point for all four emperors like for example in 303 AD when they came together at the capital to celebrate the 10th anniversary of the implementation of the tetrarchy. This is further corroborated when the tetrarchy began to break down in later years. In 306 AD Maxentius, the son of the tetrarch Maximian, rebelled and declared himself emperor against the established order of his time. He chose Rome as his residence and was actively supported by the praetorian guard based at the city. Huge new palaces and other monuments were erected in his honor. On some of his coins Maxentius stressed his intimate connection to Rome by calling himself conservator urbis suae (“preserver of his city”). Later he was defeated by another rebel against the established order of the tetrarchy, Constantine the Great. Constantine also tried to demonstrate a special connection to the city of Rome. He rededicated many of Maxentius’ monuments to himself, commemorated his victory over his rival with a new triumphal arch, massively enlarged the Sessoriana palace at the city limit and even seems to have planed for a time to be buried at Rome. Only after he had become the sole master of the empire and had no rivals to compete with anymore would he become more distant towards the old capital. Then he began to prefer his newly founded residence of Constantinople in the east.
Even though the tetrarchy already came to an end in the early years of the fourth century many of its principles continued throughout the century. The simultaneous rule of more than one emperor was still the norm. Those emperors still didn’t rule from one place but traveled continuously through the provinces. They used several different residences like Milan, Trier, Antioch or Constantinople and only visited Rome for special occasions. It is only with the beginning of the 5th century that the emperors again began to settle down. In the east Constantinople became a permanent seat of governance. In the west however this role was shared by Ravenna in the northeast of Italy and, again, Rome. So even right up to the fall of the Western Roman Empire in the last quarter of the 5th century was Rome still used as a capital.