Was it their leaders not being in touch with the people/corrupt or something else?
It’s a very complicated issue with a whole host of potential reasons that have been put forward. In Adrian Goldsworthys 'The Fall of The West: The Death of the Roman Superpower' (incidentally a superb read for anyone interested in this period), he states that a German Scholar recently catalogued a total of almost 200 proposed reasons for the fall. Many of these have been more reflections on the historians time than late antiquity. For example; Marxists placed the reason for the fall on class warfare whereas Enlightenment thinkers placed the blame (at least partly) at Christianities door. The quintessential study on the Fall of Rome is of course Edward Gibbon writing in the 19th century, his work 'The Decline and Fall of the Roman Empire' is generally seen as the basis for modern theories on it even if the majority of Gibbons conclusions have been discredited or have been found to be a little simplistic or exaggerated.
Traditionally, the theory goes that the Roman people grew too comfortable and civilized and lacked the courage and guts to serve in the Roman Army and defeat defend the empire from the Barbarian horde. As such the Legions would take more and more recruits from outside the empire which lead to a ‘Barbarization’ of the Army which in turn made it much more prone to civil war and to revolt. Then when the generals could no longer restrain their ‘foreign’ troops they proceeded to run riot inside the provinces while other barbarians crossed the frontiers and eventually carved the empire up into their own kingdoms. Now I have just condensed an epic read from a huge book into a paragraph so I apologize if any of Gibbons fans out there take issue.
However, I personally think the most credible model for the collapse of Rome is the absolutely staggering amount of Civil Wars that plagued the western empire from the death of Marcus Aurelius right down to the very end with only a few extended breaks from it under very strong leaders such Septimus Severus, Aurelian and Constantine. (All of them, incidentally, seized power through armed conflict themselves.) During the end of the second century and into the third, a potential emperor would need to be from the senatorial class and would have to gain the loyalty and affection from a large number of troops whilst also not being seen as an illegitimate usurper by the rest of the Roman Army. This is why large campaigns that were not presided over by the Emperor himself were so strictly controlled, such as that of Corbulo in Armenia; he had multiple legions that were very loyal to him after a hard fought campaign and Nero saw this as such a risk that Corbulo was instructed to commit suicide, which he promptly did. Why did he do this? Because the Roman elite at this time all derived from the Senate as such the only people that could be seen as a legitimate Emperor was limited to a handful of prominent senators, all of whom a good Emperor would know intimately and that when they were away winning military glory (essential for a Roman Emperor, especially one attempting to establish a dynasty); their families would be in Rome under the watchful eye of the Emperor. Fast forward a few centuries to when several short reigns and destroyed any sense of legitimacy for any ruling family and the emperors of this period come to rely more and more on the equestrian class to command the armies and govern the provinces. The theory here was that since equestrians couldn’t rise to be emperor, they could be placed in the important positions without risk of rebellion. Unfortunately, what came out of this was a system whereby all someone had to do to become Emperor was rally enough troops to his cause on the spot and march on wherever the court happened to be (Rome steadily declined in real importance during this period). If one man did that and was successful, you could be sure a few more in other areas would attempt the same thing, after all why not? He’s the same rank as you and had fewer or the same number of Soldiers so go for it!
The result was troops being granted relaxed discipline and increased pay (when the economy was already in decline) in order to win their loyalty. Time and time again troops were marched away from the frontiers to kill other Romans; utterly destroying the patterns of recruitment and especially training that made the legions so effective. By the time you get to the fifth century (I’m massively speeding through this as its an incredibly complex topic) you have a succession of weak emperors utterly dominated by powerful generals or court officials. Most of these powerful generals were of Germanic origin but it would be a mistake to see them as barbarians, the Romans had recruited from outside the republic/empire for almost as long as their had been one. What had happened now was that the massive losses incurred as a result of the civil wars and plagues had warranted a massive increase in recruitment to the Roman Army but the citizens proved unwilling and conscription was now deeply unpopular. As a result the legions took an ever increasing number of recruits from over the frontier, men who came as tribes, families or sometimes just as individuals to improve their lot by joining the empire.
As far as we can tell, they caused no problem due their origins until they began to serve, not as any other soldiers in the Army, but as ‘Foedorati’: that is still within their tribal groupings under their king but under nominal Roman command. It is these groups that then began to break away and carve out their own territory (such as the Visigoths in Aquitania). But by now, central authority had become far too weak to stop them. Indeed, one of the things one notices when studying this period is that at the times the once mighty Roman state is virtually invisible, as well the supposedly massive Roman Army that the Nottitia Dignitatum suggests. In time, these barbarian grouping became the only way the state could impose any form of authority. If the Franks invade, pay the Vandals to fight them off! When the Vandals turn against Rome, use the Visigoths to put them down; and so on. Eventually the central Roman government was so weak and ineffective that Barbarian leader named Odoacer deposed the young emperor (ironically named Romulus Augustulus, history is nothing without its sense of humour), sent the imperial regalia to the Eastern Emperor in Constantinople and crucially, did not proclaim himself emperor but instead submitted his new kingdom to the nominal authority of the Eastern Empire.
That’s a (very) quick summary of events leading up to the fall of the Western Empire. There’s massive amounts I had to leave out but I find it a fascinating period, the only thing that tend to trip you up is the lack of sources for the overall state of the empire. Adrian Goldsworthy puts it best ‘If we had the same amount of information for the 20th century as we do for the third, than we would not have any real than we woud not have real idea of the scale of the Great Depression, or the impact of two world wars.’ For further reading I highly recommend the previously mentioned ‘The Fall of The West: The Death of the Roman Superpower'. Edward Gibbon ‘The Decline and Fall of Rome’ or Peter Heather ‘Fall of the Roman Empire’.
EDIT: Was a wall of text, broke it up a bit!