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, while other groups vehemently deny this claim saying 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 greatly as to what this passage in John 2 is here for and what God is communicating through His word to His people. Part of the reason for such varying opinion is the reality 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! Let me put this another way: Scripture is giving us what we need, and not necessarily what we want. The text of Scripture gives 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 simply weighing in and 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. For example, most of the epistles are written to real people who are experiencing very specific circumstances and situations, and 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 specifically for the purpose of recording those events in Jesus' life (particularly His signs) which will bring about belief in his readers that Jesus is the Christ, and through their belief that they may find life in His name. If we go back and read this particular event at the wedding in Cana, we see that John includes one other detail that is important to him and further explains why he includes it in his gospel (but it's 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.)
There are many passages, particularly in "narrative" sections of the Bible, where people do things that seem strange to us.
This is to be expected, since the Bible records real life events. Think for a second about your life and things that you've experienced ... (seriously, do it!).
Can you think of many examples of situations that you were involved in or observed where people acted, reacted and responded to others exactly as you expected them to?
I'm not a prophet, but I'm guessing that there are very few (if any!) situations where that has been the case for you.
There is truth to the cliche statement that reality is stranger than fiction. In this case, John is recording an event as it actually happened, and it shouldn't be surprising that Jesus (or anyone else) acts in ways that seem somewhat strange.
Even stranger, however, is that the interaction between Mary and Jesus is part of the narrative at all, since John's focus is on the miracle and the result (his disciples believed, and hopefully so will you, the reader). 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, but is a very specific title that 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) and that 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, which I am copying here in full:
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, but 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) to see that clearly Jesus knew that He was to go to the cross at a very specific time (for more on this, study Lesson 27, especially the Going Deeper section), 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, and 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 and 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, but instead because it was time to begin His public ministry and so He did this "sign" so His disciples would believe (John 2:11). I think John included this passage because it demonstrates an important principle that 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, and His response towards them and the inclusion of the theme of obeying the will of the Father in Matthew 12:46-50; Mark 3:31-35; and Luke 8:19-21.
Although still speculative, I think this answer is founded squarely on the entirety of John's Gospel.
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: the one who says he abides in Him ought himself to walk in the same manner as He walked (1 John 2:6, NASB).