A: This is a really great question! If you briefly survey commentators and notes on this passage, you'll see that the significance of this particular statement and passage is not uniformly agreed upon.
Some groups maintain that this passage (among others) teaches that Jesus can never say "No" to His mother and thereby proves the efficacy of prayers to Mary. Other groups vehemently deny this claim. Some say that Jesus' response to His earthly mother is disrespectful or at least indicative of a change in their relationship as He is entering into public ministry.
Clearly, opinions vary. So, what is this passage in John 2 here for and what is God communicating through His word to His people?
Part of the reason for such varying opinion is that the text simply doesn't explain exactly why Jesus responds to His mother in this way and then changes the water into wine anyway! Scripture is giving us what we need and not necessarily what we want. The text of Scripture tells us what happened without an explicit description of why, which is what the Questioner is asking.
Since there is no explicit answer to "why" in this chapter of John's Gospel, we have to first understand that our answer is at least partially speculative. Instead of me just giving my opinion, let's try and address this question by looking closely at the context and purpose that the author (John) had in recording this event. It seems that the Big Picture view is the best clue to "why" that we're going to get!
Often when reading the books of the New Testament, we have to do some background study to understand the historical situation that led to the book being written. Most of the epistles are written to real people who are experiencing very specific circumstances and situations. These New Testament letters reflect those scenarios (sometimes explicitly like in Philemon, and other times not-so-explicitly like in II John).
Fortunately, for us, John tells us exactly why he records what he does near the end of his gospel:
Therefore many other signs Jesus also performed in the presence of the disciples, which are not written in this book; but these have been written so that you may believe that Jesus is the Christ, the Son of God; and that believing you may have life in His name. (John 20:30-31, NASB)
John is writing for the purpose of recording events which will bring about belief that Jesus is the Christ. Through their belief, they may find life in His name. We should read this particular event at the wedding in Cana in light of this purpose. We see that John includes one other detail that is important to him and further explains why he includes it in his gospel. It's something that is not recorded in any other gospel:
This beginning of His signs Jesus did in Cana of Galilee, and manifested His glory, and His disciples believed in Him. (John 2:11, NASB)
Now, we can give a definite answer as to why John recorded this event. But that still doesn't answer why Jesus responds to Mary this way! (Bummer.)
Knowing John's purpose in recording this event still allows for the question of why the interaction between Mary and Jesus is mentioned at all. John's focus is on the miracle and the result. His disciples believed. Hopefully, so will you, the reader. But John must have had some reason to be inspired to include this interaction between Jesus and Mary.
A clue is likely found in the fact that John wants us to believe something very specific about Jesus; namely, that He is the Christ.
It's important to note that "Christ" is not Jesus' last name. Some people think it is. Instead, "Christ" is a very specific title. It points to Jesus' mission, identity, and work. As the Christ, Jesus had a very specific agenda: Perfectly obey His Father and fulfill His ministry.
If you sit and read the Gospel of John from beginning to end you'll notice that Jesus is always consumed with doing the will of His Father (e.g. John 4:34; 5:30; 6:38-40; 7:16-17). He has a clear vision of His purpose in coming to Earth through Mary's womb (e.g. John 1:1-14; 12:27). He came to die for the sin of the world by laying down His life (e.g. John 1:29; 10:11-18; 15:13).
If we understand that greater context of what Jesus was doing and how He understood His purpose and mission, we can see how He might respond with this figure of speech to Mary when asked to do something about the lack of wine at the wedding. The NET Bible has a great translational note on this passage. I am copying here in full (underline added):
8 tn Grk “Woman, what to me and to you?” (an idiom). The phrase τί ἐμοὶ καὶ σοί, γύναι (ti emoi kai soi, gunai) is Semitic in origin. The equivalent Hebrew expression in the Old Testament had two basic meanings: (1) When one person was unjustly bothering another, the injured party could say “What to me and to you?” meaning, “What have I done to you that you should do this to me?” (Judg 11:12, 2 Chr 35:21, 1 Kgs 17:18). (2) When someone was asked to get involved in a matter he felt was no business of his, he could say to the one asking him, “What to me and to you?” meaning, “That is your business, how am I involved?” (2 Kgs 3:13, Hos 14:8). Option (1) implies hostility, while option (2) implies merely disengagement. Mere disengagement is almost certainly to be understood here as better fitting the context (although some of the Greek Fathers took the remark as a rebuke to Mary, such a rebuke is unlikely).
Jesus is disengaged with this "work" because it does not pertain directly to His mission. Jesus was not simply a miracle worker. He wasn't a performer. He worked His miracles for a purpose!
Jesus' answer also includes a phrase that is repeated often in John's Gospel: "my hour." It is worthwhile for you to read all of these passages (John 2:4; 7:30; 8:20; 12:23; 12:27; 13:1; and 17:1). Jesus knew that He was to go to the cross at a very specific time. This was all in accordance with the will of the Father.
A very similar theme occurs with slightly different wording when Jesus' brothers are giving Him a hard time before the feast in John 7. He tells them His time is not yet to go to the feast... then He goes a little later.
After considering the relevant themes, I think it is safe to conclude that Jesus took His orders from the Father and the Father only. Nothing that Jesus did was by mistake or an accident. Every action and word had a purpose. Often, well-meaning (and not-so-well-meaning) people would try and get Jesus to do things for different reasons. But Jesus only did that which His Father directed through the Holy Spirit for Him to do (John 5:19-20).
My interpretation of this passage in John 2 is that Jesus didn't change the water into wine because Mary asked Him to. Instead, He did it because it was time to begin His public ministry. He did this sign so His disciples would believe in Him (John 2:11). I think John included this passage because it demonstrates an important principle. Even though Jesus always honored His mother in fulfillment of the Scriptures (John 19:28), He did not take orders from her but only from His Father. Here, it just so happens that He ended up doing what she asked but only because it lined up with His Father's will for beginning His public ministry.
Compare this to what happened when His family came looking for Him during His public ministry. His response towards them and the inclusion of the theme of obeying the will of the Father is explicit in Matthew 12:46-50; Mark 3:31-35; and Luke 8:19-21.
I acknowledge this is still a bit speculative. I think this answer is founded squarely on the entirety of John's Gospel and the greater context. For that reason, I think we're on fairly solid ground with these conclusions.
A lesson for us in this could be as follows: sometimes our desires line up with the will of God but Jesus sought only to do the will of God (no matter who was asking).
My question for everyone reading is this: How serious are you about this truth? Scripture says, the one who says he abides in Him ought himself to walk in the same manner as He walked (1 John 2:6, NASB).
If we're serious about walking as Jesus walked, then we will be serious about laying down our agendas (and the agendas imposed on us by others) so we can walk in the grace of God with the Holy Spirit to the glory of God, our Father.