The Edict of Milan was an agreement made in 313CE between the then Western Roman Emperor Constantine and Licinius who at the time ruled the Balkans, but soon became the ruler of the eastern half of the former Roman Empire. It was called the Edict of Milan because that was where they met and made the agreement, although the actual document was promulgated by Licinius a few months later at Nicomedia, which is today known as Izmit in Turkey. 
The substance of the agreement was to tolerate Christianity and other religions within their respective regions of control.  It was also agreed to restore the properties and possessions that the Christian Church had lost under the previous Roman Emperor Diocletian, who was intolerant of Christianity. It followed a slightly earlier Edict of Toleration issued by the Roman Emperor Galerius which officially ended the Diocletian persecution of Christians.
In practice, the Edict of Milan was more like an edict or executive order than merely the record of an agreement. It was issued to provincial governors who were expected to publicise its contents to the public and presumably to implement it. On the other hand, it was not included in the Theodosian Code of Roman laws and edicts compiled in 438CE.
The original Edict of Milan was issued in multiple copies handwritten in Latin, but none of these copies has survived. The primary source under examination here was quoted by the Christian apologist Lactantius in his On the Deaths of the Persecutors (De moribus persecutorum), thought to be written in 318 CE. Although there was different version written in Greek by Eusebius, scholars think that the one in Lactantius is the original.
The actual wording of the Edict was most likely drafted by civil servants in an imperial office. However, as it records an agreement reached by the two emperors, and was published with their authority and approval (since they did not retract it), I don’t think it really matters in practice who recorded the agreement into writing. The authoritative and enduring nature of the document overrides any doubts about its authorship, in my view.
There are various historical theories as to why the Edict was published. According to a biography by Eusebius, Constantine had a miraculous vision of an illuminated Cross on the day before the Battle of Milvian Bridge against his rival Maxentius outside of Rome in 312CE. The following morning Constantine ordered the Christian symbol to be drawn on his soldiers’ shields. This event predated the Edict and may have been the real moment of Constantine’s conversion to Christianity. 
By this stage, the numbers of Christians within Empire were still small but increasing. The most severe persecution of the Christians was conducted by the Roman Emperor Diocletian and yet it failed. Bennett suggests that the Empire thus had little choice but to accommodate itself to this new and growing religion. She thinks that Constantine pragmatically nurtured Christianity in the hope that it ‘might provide a sort of glue to hold his empire together’ and subsequent Christian emperors followed his lead.
In my view, the main purpose of the Edict was to promote peace and stability within the areas controlled by the two rulers. The Edict specifically refers to ‘the sake of peace in our time’, ‘public well-being’ and ‘the interests of public quiet’. Another purpose was to shore up the public support of Licinius against his rival Maximinus Daia, who had renewed the persecution of Christians. Thus the Edict forged a political and strategic alliance between the two rulers, as treaties often do. In view of Constantine’s claimed miraculous vision before the Battle of Milvian Bridge, Constantine may in a sense have been forming an alliance with the Christian God as well.
 Kathleen Neal ed., Medieval Europe ATS1316 Unit Reader (Clayton: Monash University, 2016), p.11.
 Constantine and Lucinius ‘Edict of Milan’, in Ehler, Sidney Z. and Morrall, John B. trans. and eds. Church and State Through the Centuries: A Collection of Historic Documents with Commentaries, repr. in Medieval Europe ATS1316 Unit Reader ed. by Dr Kathleen Neal (Clayton: Monash University, 2016), pp.12-13.
 Galerius ‘Edict of Toleration’, in Internet History Sourcebooks Project http://legacy.fordham.edu/halsall/source/edict-milan.asp [Accessed 21 March 2016].
 Neal, p.10.
 Neal, p.13.
 Neal, p.12.
 This is why I have attributed Constantine and Licinius as the authors of the Edict, rather than ‘Anonymous’.
 Clifford Backman, The Worlds of Medieval Europe (Oxford: Oxford University Press, 2015), p.42.
 Ibid., p.43.
 Judith Bennett, Medieval Europe – A Short History (New York: McGraw-Hill, 2011), p.13.
 Ibid., p.13
 Constantine and Lucinius, p.13.