The first "All Soul's Day," was 998 AD on limited scale. In the 14th century it became a official day in the whole Roman Catholic Church.
It's a special day or remebrance/praying for people that died religious
and are not yet with God (very likely means in purgatory-> Concilie of Trente (1545-1563)) On that day during the sermon all names of the religious people that died that year are mentioned.
Praying for the dead started 2th century BC based on 2 Maccabees 12,43-45 in the belief that God would forgive their sins.
43 He then took up a collection among all his soldiers, amounting to two thousand silver drachmas, which he sent to Jerusalem to provide for an expiatory sacrifice. In doing this he acted in a very excellent and noble way, inasmuch as he had the resurrection of the dead in view; http://www.allerzielen.nl/
44 for if he were not expecting the fallen to rise again, it would have been useless and foolish to pray for them in death.
45 But if he did this with a view to the splendid reward that awaits those who had gone to rest in godliness, it was a holy and pious thought.