This is a very, very ambitious question, and could suffice to inspire an entire book. In any case, because of the complexity involved, I want to address the last part of your question first: "what could be accounted for this transformation?" In this case, simple as it may seem, the most important factor was probably time. The Middle Ages constitutes a vast span of time. If we start the clock with the fall of Rome and end it at around 1400, we're looking at a period of roughly 900 years, and that is a lot of time in which cultures and politics can evolve.
In any case, I would suggest that the early Middle Ages were more than anything defined by the collapse of Roman power in Western Europe, with the Empire fragmenting into various more localized power structures. That being said, the image of the Dark Ages has largely been refuted as historical myth. Even so, we should not underestimate the power vacuum that emerged from the imperial collapse. At the same time, we should note that there was a great deal of political instability and turmoil present within this time period, resulting in Feudalism's evolution in Western Europe. Finally, while accepting that the Roman Empire collapsed, we should not forget that Christianity remained a Roman religion, and the Ecclesia a Roman institution, and moreover it was one whose domain and authority stretched over all of Western Europe. It was not by accident that the Church was the most powerful of all institutions in the Medieval world.
From here, you would need to trace how Europe evolves in the centuries that comprise the Middle Ages, and there are many themes you can tackle. You can speak about societal trends: the revival of towns and cities, growing from trade fairs along trade routes to become new European urban centers. You can focus on political trends: the emergence of new Kingdoms and dynasties, as well as the gradual consolidation of power. Historians have tended to suggest that there was a fundamental conflict of interests at play between Kings and Feudal Lords, and that across the Middle Ages, we see Royal power and authority gradually increasing at the expense of local power structures. You can discuss the universities and the intellectual evolutions within Christian Scholasticism (which is much more vibrant and multifaceted than it is often given credit for). There is a lot of dynamism within the Medieval world, and there are a lot of angles through which to take this investigation.