Fire is often a symbol of judgment, but it is also a symbol of God’s presence. Since this segment is following the teaching about the end times and watchfulness, it would seem to be meaning “judgment”, except that he is narrowing his gaze to the crucifixion (see next verse). I think he’s changing focus a little, and modulating from the end times to his own death. The “fire on the earth” is Christ’s resurrection, which is a sign of God’s presence (Jn. 17: now will the Son be glorified; Pentecost and the HS), God’s judgment, and the division that the cross will bring (a stumbling block that also brings salvation).
It’s interesting, though, that he speaks in the present tense. Maybe it’s a futuristic present—a prophetic present.
F.F. Bruce writes,
"It’s natural to link this “fire” with the “fire” mentioned in John the Baptist’s description of the work to be accomplished by the one whose way he was preparing (Lk. 3.16: He will baptize you with…fire). The fire is closely related to the Holy Spirit (Cf. Mt. 3.11). Both Matthew and Luke continue with the image of the fire burning the chaff on the threshing floor. Both the wind (to blow away the chaff) and the fire are symbols of the Holy Spirit. They depict the work that the Messiah is to do by the power of the Spirit, separating the true children of kingdom from those who are only nominally so (Cf. Ps. 1.4).
"Jesus’s ministry was not one of judgment as John envisaged, but it certainly was one of sifting and separating. Jesus was plainly looking for something further when he said, 'How I wish the fire had already broken out!'
"This also corresponds to Jesus’s statement in 12.51-53 where he says he came to bring division. He saw division and strife as the effect of his ministry, but that wasn’t his desire."
This is not a heartfelt desire to fry people in judgment. The fire symbolizes salvation, the Holy Spirit, and judgment. Jesus is eager for the fulfillment.
As far as v. 51 is concerned: Obviously, he speaks contextually, because in John 14.27 he said he came to bring peace. In many senses, Jesus has come to bring peace to individuals, by saving them, freeing them from the slavery of sin, breaking down barrier walls between people, and reconciling people to God. But in another sense, the person of Jesus brings conflicts between people, as many people mock and treat him with derision, while others worship. People fight over Jesus and over faith. The cross of Christ is both a stumbling block and it breaks down the walls of separation.
The division between families is not really the point. The point is that sin will be judged now, just as it was in ancient Israel. Sin causes deterioration of families, relationships, and societies. Jesus has come to heal, restore, and reconcile, but many don't accept it, and that in itself creates more problems.
But then when he says "they'll be divided, father against son," etc., that's actually a quote from Micah 7.6, a passage about the sin that caused that exile, and the forgiveness that restores people, reconciling them to God and to each other. So what he's really talking about, though it isn't clear on the surface, is his whole mission in coming to earth, especially the cross. In the Micah passage, things had gotten so bad in the country, because they had deserted the Lord, that families were breaking up and the whole society was crumbling. But Micah says in 7.7: “But as for me, I watch in hope for the LORD, I wait for God my Savior; my God will hear me.”
Christ has come to knit families together, even all of humankind. And so people are bonded to each other through Christ. Christians should be at the forefront of healing fractured families and of reconciling people to each other. But equally Jesus' presence can create disruption. As in ancient Israel, the prophets of the Lord got killed. When Jesus came, people lined up for him, and against him. Many families were brought together in Him, and I am hard-pressed to come up with a single Scriptural example of a family that was torn apart by faith. God created families to work, not to fall apart. It was not His desire that some families were torn apart, but you can never say never. Sin being what it is, it happens. There will always be a tension between darkness and light (2 Cor. 6.14).