In the Late Middle Ages, theologians tried to keep All Saints and All Souls strictly apart. But traditions like souling and the distribution of Soul Cakes helped to fuse the feasts
The feast for all Saints has very early roots. In the period immediately after 313 when the church was legalised a joint commemoration of the martyrs and saints was instituted. At that time it was celebrated on the first Sunday after Pentecost. Both St. Ephrem (d. 373) and St. John Chrysostom (d. 407) attest to this feast day in their sermons. At that time, it seemed appropriate. Many of the early martyrs had died together; further, there were not enough days in the year to go around.
Later, the appointed day became fixed on the 13th of May, which was chosen by Pope Bonifacius IV in AD 609 as the day to consecrate the Pantheon in Rome as a Christian Church dedicated to the Virgin and all the Martyrs.
Some scholars believe, this day was chosen since it was traditionally marked by the Feast of the Lemuralia, during which the Romans performed rites intended to exorcise or placate the malevolent and fearful ghosts of the dead from their homes. On that day, the Vestals would prepare the sacred mola salsa, a salted flour cake, from sacred water and flour from the first ears of the wheat of the season mixed with grounded salt. However, hundred years later, Pope Gregory III moved the date to the 27th of October, when he dedicated an oratory in St. Peter’s for the relics “of the holy apostles and all of the saints, martyrs and confessors, of all the individuals, just made perfect, who are at rest throughout the world” .
Around the same time, Bede († 735) recorded the celebration of all Saints on the 1st of November in England. A hundred years later Pope Gregory IV appointed this day as All Saints Day and asked Louis the Pious to proclaim the feast throughout the Carolingian Empire. However, it was not until the beginning of the new millennium, the 1st of November was advocated by Cluny and formally established throughout the church. Whether or not this was meant to suppress the ancient festival character of the late autumn season, which was otherwise dedicated by the Romans to traditional circus-games, is not known. Another question is why either of the Popes did not fuse their new church feasts with the ancient Roman celebration, the private Caristia or Cara Cognatio, which took place from the 13th-21st of February. During this week, the souls of the dead family members were venerated. On this day, families visited the tombs of their ancestors and offered sacred offerings of bread soaked in wine, salt, wheat, flower-garlands and violets petals; all reminiscent of the celebrations of the later “Halloween”.
Honour is paid, also, to the grave. Appease the souls of your fathers and bring small gifts to the tombs erected to them. Ghosts ask but little: they value piety more than a costly gift: no greedy gods are they who in the world below do haunt the banks of Styx. A tile wreathed with votive garlands, a sprinkling of corn, a few grains of salt, bread soaked in wine, and some loose violets, these are offerings enough: set these on a potsherd and leave it in the middle of the road. Not that I forbid larger offerings, but even these suffice to appease the shades: add prayers and the appropriate words at the hearths set up for the purpose. This custom was introduced into thy lands, righteous Latinus, by Aeneas, fit patron of piety. He to his father’s spirit solemn offerings brought; from him the peoples learned the pious rites. 
The Feast of All Souls developed alongside All Saints as a day for commemorating all the dead (and not just the saints and martyrs). This was instigated by abbot Odilo of Cluny in the beginning of the 11th century when he decreed for all the Cluniac monasteries that special masses and prayers should be offered for all the departed souls. In the beginning, the two feast were deliberately placed one after the other.
However, In the later Middle Ages, the mingling of the two church feasts was met with consternation of theologians. All Souls was simply too much coupled with popular beliefs and traditions. All over the Western Church kin groups began to visit graves, place candles, or light bonfires as well as (in some parts of Eastern Europe) partake of meals on the graves. To what extent these traditions were rooted in ancient pagan customs and thus represented reinvented traditions is not known. But they became widely popular. Added to this was the direct giving of alms to buy an indulgence for the deceased (as opposed to almsgiving in the context of the church). Out of this grew the tradition of “Medieval Souling”, according to which it was believed that for every piece of bread given to the poor, a soul could be redeemed from the fire of Hell.
In a sermon from around 1380, the medieval preacher, John Mirk characterises the tradition of “souling” as old: “… wherefore in olden time good men and women would this day buy bread and deal [give] it for the souls that they loved, hoping with each loaf to get a soul out of purgatory” . Another tradition was the Ringing of Bells on the night of All Saints, which was thought to bring joy to the poor souls in the purgatory.
Both traditions – Souling and the Ringing of Bells – were some of the more tenacious after the reformation and lingered on in many places, even while other traditions were abolished and suppressed by Puritans and Calvinists. Lutherans, though, kept the celebration of All Saints (with its church traditions), but tried to abolish the festivities and traditions connected with All Souls. It stands to reason though that the traditions were kept faithfully in the Catholic Church, where belief in the existence of purgatory is still a part of the official church dogmatics.
However, at the beginning of the 19th century the German romantically inspired theologian, Schleiermacher, argued for a Lutheran revival of the feast. The prime mover was the stupendous loss of human life in the Napoleonic Wars. These “new” celebrations were placed at the end of the church calendar on the last Sunday before Advent. Another reason was that the celebration of the 31 October was reserved for the celebration of the Reformation since Luther had advertised his 95 theses exactly on the evening before All Saints in 1517.
Out of this romantic revival grew the renewed celebration of All Souls. Today it is common in Lutheran Europe to celebrate All Saints with a special service in the evening, where the names of the recently dead are read aloud. Afterwards, the congregation walks to the graveyard and light candles on the graves. At home cakes have been baked (or bought) for children who are once again walking from door to door begging for alms or “soul-cakes” (or candy)
However, it was probably inspiration from the more “folksy” traditions among the Irish and Scottish immigrants to USA, which generated the commercial Halloween which has been taken up so enthusiastically by Europeans in the last few years.
 All Saints Day. In: The Oxford Dictionary of the Christian Church, 3rd edition, ed. E. A. Livingstone (Oxford: Oxford University Press, 1997), pp. 41- 42
 Ovid’s Fasti, Book 2: IX. KAL. 21st. Translation from: The Theoi Classical Texts Library
 John Mirk’s Festial: edited from British Library MS Cotton Claudius A.II. Susan Powell ed, British Library, Early English Text Society, Oxford University Press 2009, p. 270)
The Rise and Fall of Merry England. The Ritual Year 1400 -1700.
By Ronald Hutton.
Oxford University Press 1996
The English Year
By Steve Roud
Penguin Books 2006
Mummers. Source: Bodleian Library, MS. Bodl. 264 fol 22r. Wikipedia