While the British Isles certainly do have many accents compared to areas that are more newly settled -- America, Canada, Australia, the eastern part of Russia, etc. -- I'm not sure if it has an inordinate number of accents and dialects when you compare it to other areas with similar histories -- i.e., other European countries that have been settled by the speakers of that language for more than 1,000 years. For example, there are many, many regional variations in Germany and Italy, and probably in other European countries too.
The existence and evolution of different dialects started immediately. Different Germanic tribes who settled in England after the fall of the Roman Empire spoke different dialects. The basic linguistic divisions were between the Angles, the Saxons and Jutes. They remained distinct even after evolving into what would be considered "Old English." Scots, too, had its origins in Northumbrian, which was the Anglian dialect spoken in the Kingdom of Northumbria. Later, the Vikings would come and would influence both future standard English and, more particularly, the local dialects in areas where there were a lot of them.
So that's how it started, and it just continued to evolve from there. In an era where most people couldn't read and where many people didn't travel very far, outside influences, including the standard language of the capital or whatever dialect or even language the King spoke, wouldn't necessarily affect how the peasants talked. So there was plenty of time for different villages and regions to develop their own distinctive forms.