Luther accepted confirmation as a sacramental rite like, e.g., holy water, but not as a Scripture-attested sacrament.
[Luther’s words will be in blue]
Lutherans have differed on the question through the centuries, with some observing it and others not doing so (and with different understandings of it). We again find Luther, characteristically, refusing to disallow it, and he preached on at least one occasion that he would not find fault:
. . . if every pastor examines the faith of the children . . . lays hands on them, and confirms them. (in James F. White, Protestant Worship: Traditions in Transition, Louisville: Westminster John Knox Press, 1989, 45; sermon of 15 March 1523 [WA, Vol. XI, 66] )
Some have maintained that Luther’s Small Catechism, written for children, was, in effect, a means for parents to prepare their children for confirmation, so that later a pastor could examine and confirm them.
Luther approved of, for example, the Brandenburg Church Order of 1540, written by Johannes Bugenhagen, that included confirmation and even episcopal church government. He also supported the Wittenberg Church Order, composed by Melanchthon in 1545. This included a confirmation rite as well.
Luther was fairly clear in his treatment of the topic in his 1520 treatise, The Babylonian Captivity of the Church:
I wonder what could have possessed them to make a sacrament of confirmation out of the laying on of hands, (Mark 16:18; Acts 6:6, Acts 8:17, Acts 19:6) which Christ employed when He blessed young children, (Mark 10:16) and the apostles when they imparted the Holy Spirit, ordained elders and cured the sick, as the Apostle writes to Timothy, “Lay hands suddenly on no man.” (1 Timothy 5:22) Why have they not also turned the sacrament of the bread into confirmation? For it is written in Acts 9:19, “And when he had taken meat he was strengthened,” and in Psalm 104:15, “And that bread may cheer man’s heart. “Confirmation would thus include three sacraments — the bread, ordination, and confirmation itself. But if everything the apostles did is a sacrament, why have they not rather made preaching a sacrament?
I do not say this because I condemn the seven sacraments, but because I deny that they can be proved from the Scriptures. Would to God we had in the Church such a laying on of hands as there was in apostolic times, whether we called it confirmation or healing! But there is nothing left of it now but what we ourselves have invented to adorn the office of the bishops, that they may have at least something to do in the Church. For after they relinquished to their inferiors those arduous sacraments together with the Word, as being too common for themselves, — since, forsooth, whatever the divine Majesty has instituted has to be despised of men — it was no more than right that we should discover something easy and not too burdensome for such delicate and great heroes to do, and should by no means entrust it to the lower clergy as something common — for whatever human wisdom has decreed has to be held in honor among men! Therefore, as are the priests, so let their ministry and duty be. For a bishop who does not preach the Gospel or care for souls, what is he but an idol in the world, having but the name and appearance of a bishop? (1 Corinthians 8:4) But we seek, instead of this, sacraments that have been divinely instituted, among which we see no reason for numbering confirmation. For, in order that there be a sacrament, there is required above all things a word of divine promise, whereby faith, may be trained. But we read nowhere that Christ ever gave a promise concerning confirmation, although He laid hands on many and included the laying on of hands among the signs in Mark 16:18 “They shall lay their hands on the sick, and they shall recover.” Yet no one referred this to a sacrament, nor can this be done.
Hence it is sufficient to regard confirmation as a certain churchly rite or sacramental ceremony, similar to other ceremonies, such as the blessing of holy water and the like. For if every other creature is sanctified by the word and by prayer, (1 Timothy 4:4 f.) why should not much rather man be sanctified by the same means? Still, these things cannot be called sacraments of faith, because there is no divine promise connected with them, neither do they save; but sacraments do save those who believe the divine promise.(Albert T. W. Steinhaeuser / Robert E. Smith version; cf. Three Treatises section: pp. 218-219)
Philip Melanchthon’s Apology for the Augsburg Confession (1530) states:
6] Confirmation and Extreme Unction are rites received from the Fathers which not even the Church requires as necessary to salvation, because they do not have God’s command. Therefore it is not useless to distinguish these rites from the former, which have God’s express command and a clear promise of grace. (Article XIII [VII]: Of the Number and Use of the Sacraments; from Triglot Concordia)
Bibliography of Sources
The Babylonian Captivity of the Church, translated by Albert T. W. Steinhaeuser; English text edited and modernized by Robert E. Smith . Originally published in Works of Martin Luther with Introductions and Notes, Philadelphia: A. J. Holman Company, 1915, 167-293. Available online.
Triglot Concordia: The Symbolical Books of the Evangelical Lutheran Church: German-Latin-English, translated by F. Bente and W. H. T. Dau, St. Louis: Concordia Publishing House, 1921. The entire Book of Concord (including the Apology for the Augsburg Confession) is available online.