How do Lutherans or Reformed Christians interpret Acts 8:16? A little context, Acts 8 tells us about Philip baptizing the people of Samaria, however people that have not received the Holy Spirit, even after baptism, until Peter and John lay their hands on them on verse 16.
How do Lutherans and other mainline protestants, who believe the Holy Spirit descends upon a believer at baptism reconcile this idea with this verse?

I'm asking about mainline protestants like Lutherans and Reformed Christians because this obviously is not a problem for credo-baptist Christians or for Orthodox and Catholic who affirm the sacrament of confirmation.
To start out with: I agree with Nigel J that in my life-long experience as a protestant, water-baptism has not generally been made out to be a necessary act to receive the Holy Spirit. On the contrary, most messages I have heard specifically on baptism tend to emphasize that baptism is not necessary for salvation, although it is both beneficial and commanded by Jesus. This is typically to emphasize:

(1) Salvation is by God's grace alone through faith alone (i.e. there is no action you can perform which contributes to your salvation).

(2) Baptism is an outward, and public, sign of the inner reality of regeneration which the Holy Spirit has already begun in a believer's life. In fact regeneration by the Holy Spirit must precede baptism, otherwise the faith which a person puts on display by seeking and receiving baptism is impossible. The effects of total depravity to prevent surrender to God and trap a person in sin, can only be overcome through the unilateral and prior work of the Spirit in a believer's life.



That said, within Lutheran theology there seem to be two ways to look at this question, depending on who is being baptized. According to the Missouri Synod of the Lutheran Church:


  Baptism is one of the miraculous means of grace...through which God creates and/or strengthens the gift of faith in a person’s heart


The key here is in the and/or which is dependent on whether the baptism is of an infant or of an adult.

(1) If an infant is baptized, this baptism is regenerating and actually "creates...new birth" even though it "cannot...be verbally expressed or articulated by the child". This faith "needs to be fed and nurtured by God’s Word" as the child grows up.

(2) In line with the view I expressed at the start of this answer, in an adult, Baptism should "soon follow conversion" [emphasis added]. This is because as cited above, Baptism is only "one of" the means God uses to produce grace. For adults, faith "can also be created in a person's heart by the power of the Holy Spirit working through God's (written or spoken) Word." In other words through the Spirit's conviction and regeneration of a person hearing (or reading) the Word of God in the message of the gospel preached. Therefore, for the adult, Baptism is performed "for the purpose of confirming and strengthening faith" not for creating faith s it does in the infant.

This means that when it comes to adult baptism, the coming of the Holy Spirit to regenerate a sinful person and convert them into a believer is typically seen as an action  distinct from the act of baptism itself. This, although for infants, baptism is believed to actually produce faith and bring the Holy Spirit.

It seems at this point one could then say that for the Samaritans in Acts 8, the order of events occurred in reverse. However, this would be misleading, since while the regeneration of the Holy Spirit and water-baptism are distinct in both act and therefore potentially within time, they nevertheless necessarily occur in that order. Therefore, the Lutheran is still left with explaining why Philip has baptized Samaritans who evidently expressed saving faith (only possible through the prior regenerating work of the Holy Spirit) when their 'receiving' the Holy Spirit comes some time later.

Two other methods could used to explain this apparent contradiction in the Lutheran ordo salutis. The Reformed perspective also seems to fit best with the first.

(1) Verse 16 makes clear that something was different about their baptism, as opposed to the type of baptism commanded by Jesus in Matthew 28:19-20. Instead of the Trinitarian formula being used, in the NIV "they had simply been baptized in the name of the Lord Jesus."

This is almost an unparalleled occurrence, and for Reformed theologians, this anomaly by itself seems sufficient to explain why the Spirit comes in an anomalous manner. For them, the book of Acts is "the transition in redemptive history" in which the Gospel is transformed from a Jewish to a global religion. For them, the geographical regions singled out in Acts 1:8 mark barriers that the Spirit must anomalously cross.


  ...the Spirit baptisms Luke records in Acts conform to this geographic
  spread of the gospel...


Lutherans too, seem to see this passage as an anomaly which is intended to emphasize the barrier crossing act which was occurring. That is why a writer from "Luther Seminary" says:


  ...Acts 8:14-17 is probably an invitation to cross-cultural discipleship models. Considering the long history of hostility between Jews and Samaritans, the delay of the Holy Spirit is indeed a literary device meant to summon believers to recognize the role of the Spirit in opening worship doors to all people...


If the reader remembers the words of John the Baptist, the difference between the Baptism's he performed and those Jesus would usher in was the presence of the Holy Spirit and Fire. Therefore, this point would explain Acts 8 as being literar-illy and/or redmto-historically anomalous meant to highlight the Holy Spirit's consent to boundary crossing of the the Gospel from Jewish message to global proclamation.

(2) However, another perspective of this passage, and similar passages, is possible from the Lutheran perspective. This also happens to be a perspective more amenable to the Pentecostal interpretation, since it essentially distinguishes between the (a) regenerating work of the Spirit which produces faith and enables water-baptism, and (b) being 'filled with the Spirit' in the form of power for service. This is not exactly the view espoused by some Lutherans, but in an address to the Reformation Lutheran Church one Pastor wrote in reference to several passages in Acts that there seem to be "special outpourings of the Spirit" where specific persons are "given a special measure of the Holy Spirit in order to bring about their service to the Lord."

This still considers such 'filling' to be unique to Acts, and so would explain incidents like those occurring in Acts 8 as being reserved to the Apostolic age (a period during which the original 12 apostles still lived and ministered). Furthermore, the author doesn't seem to apply this generally, but instead to specific persons with specific tasks within the Church, but it opens up the possibility of explaining Acts 8:16 as being a referencing to a sort of 'filling' (Reformed churches are cessationist and Lutherans seem to be de facto cessationist) of the Spirit, distinct from the regenerating work which must precede the baptism of adults.

So, in answer to your question, there are potentially two ways of understanding Acts 8:16 from a Lutheran/Reformed perspective, although the first - that it is a literary and part of a redemptive-historical anomaly - seems to be more canon. As a non-cessationist closer to the holiness side of Protestantism than the magisterial (Lutheran, Anglican, Reformed), I personally prefer to second.