The Church officially outlawed cremation in 1886 when the Vatican issued a statement banning it, particularly because it was commonly used in Masonic rituals [see the book Questions and Answers by Father John Dietzen]. The Pio-Benedictine Code of Canon Law (1918 Code) upheld this by law.
This changed in 1963, when the Vatican, through what is now called the Congregation for the Doctrine of Faith, took away the ban on cremation, but only in narrow circumstances. Burial was still to be HIGHLY preferred and if a cremation happened, it could only happen after a Catholic service where the body was still intact.
In 1969 the Vatican allowed Christian burial for those who were cremated in the document - Ordo Exsequiarum.
Then when the new Code of Canon law came out in 1983, it stated the following in canon 1176, section 3:
The Church earnestly recommends that the pious custom of burial be retained; but it does not forbid cremation, unless this is chosen for reasons which are contrary to Christian teaching.Finally, the Catechism of the Catholic Church says this, while citing the Code of Canon Law:
The Church permits cremation, provided that it does not demonstrate a denial of faith in the resurrection of the body.The Compendium of the Catechism says:
479. How are the bodies of the deceased to be treated?
The bodies of the departed must be treated with love and respect. Their cremation is permitted provided that it does not demonstrate a denial of faith in the resurrection of the body.
Lastly from the CDF's
DIRECTORY ON POPULAR PIETY AND THE LITURGY PRINCIPLES AND GUIDELINES:
254. Christian piety has always regarded burial as the model for the faithful to follow since it clearly displays how death signifies the total destruction of the body. The practice eschews meanings that can be associated with mummification or embalming or even with cremation. Burial recalls the earth from which man comes (cf. Gen 2, 6) and to which he returns (cf. Gen 3, 19; Sir 17,1), and also recalls the burial of Christ, the grain which, fallen on the earth, brought forth fruit in plenty (cf. John 12, 24).Cremation is also a contemporary phenomenon in virtue of the changed circumstances of life. In this regard, ecclesiastical discipline states: "Christian obsequies may be conceded to those who have chosen to have their bodies cremated, provided that such choice was not motivated by anything contrary to Christian doctrine"(369). In relation to such a decision, the faithful should be exhorted not to keep the ashes of the dead in their homes, but to bury them in the usual manner, until God shall raise up those who rest in the earth, and until the sea gives up its dead (cf. Aps 20, 13).
So, we can still see a prejudice for burial over cremation, but this is now left to the discretion of the faithful as long as it is within the guidelines given above.