If nothing else wipes out human existence prior to this, at what point will the Sun make Earth uninhabitable for humans?
The Sun is gradually getting larger and brighter. In fact, as called2voyage pointed out, its brightness is increasing by 1% every 100 million years. You can see how the Sun will change in the future from this graph: (Source)
According to this paper, within 1 billion (short scale) years from now, the ever-increasing luminosity will have made Earth nearly uninhabitable. The average temperature will have reached 47°C, compared to its current 15°C. Essentially no water will be left either, except at the poles. This may allow for simple life to survive for a while.
By 3.5 billion years, Earth will no longer resemble its current self. Its oceans, magnetic field and ozone layer and plate tectonics will be no more. Its surface temperature will skyrocket to roughly 1,330°C, hot enough to melt surface rock. No longer will our planet resemble a pale blue dot, and it will be more like Venus. Our planet is officially dead, along with all life on it. (Source)
~4.5 billion years from now, the Sun will become a red giant and possibly consume Earth. However, according to this paper, it may heat up potentially habitable bodies like Triton, to the point where they would support life. Unfortunately, the Sun won't remain in this stage for long enough — life usually takes billions of years to develop.
At what point will the sun make earth uninhabitable for humans?
It nearly happened on May 23, 1967.
According to this history paper released yesterday, summarized nicely here on Space.com, at the American Geophysical Union (paper publisher), and in many other media outlets, a powerful Earth-directed solar flare on that date jammed radar of the US Air Force's Ballistic Missile Early Warning System. Radar jamming like that, especially across all three sites, was considered an act of war, with the Soviet Union as the obvious culprit. Nuke-laden planes prepared to go destroy the enemy and set off the nuclear war that likely would have rendered Earth uninhabitable for humans.
Fortunately for all of us, the US had invested resources in monitoring the sun several years earlier, and somebody figured out that this was a solar flare with just enough time to stop the nuclear deliveries and keep the Cold War cold.
If that bulletin had been delayed a few minutes, those nuclear aircraft could have launched, and the solar flares would have made it impossible to communicate in the air. If those aircraft had launched, there would have been no way to call them back.
It also nearly happened on September 26, 1983.
With the superpowers again at hair trigger tensions, a rare alignment of sunlight glinting off high altitude clouds and the highly elliptical orbits of Soviet early-warning satellites caused the detection system to report that five intercontinental ballistic missiles, likely carrying nuclear warheads, had been launched by the United States against the Soviet Union. With only a short time to act on such a report, Soviet leaders likely would have launched a large nuclear strike against the US in retaliation for the detected attack. However, the human on duty to receive this detection report was civilian-trained Stanislav Petrov, who was skeptical of the detection and correctly classified this as a false alarm. (Five nuclear missiles seemed small for the kind of attack he expected from the US.) This decision has been credited with preventing a large-scale nuclear war, which otherwise would have been triggered by misinterpreted sunlight.
So a possible answer is, "the next time some tense socio-technical system we've built misinterprets the Sun."
According to Wikipedia's timeline of the far future this will happen at least in 800 million years from now:
Carbon dioxide levels fall to the point at which C4 photosynthesis is no longer possible. Free oxygen and ozone disappear from the atmosphere. Multicellular life dies out.
But it might already end 200 million years earlier:
The Sun's increasing luminosity begins to disrupt the carbonate–silicate cycle; higher luminosity increases weathering of surface rocks, which traps carbon dioxide in the ground as carbonate. As water evaporates from the Earth's surface, rocks harden, causing plate tectonics to slow and eventually stop. Without volcanoes to recycle carbon into the Earth's atmosphere, carbon dioxide levels begin to fall. By this time, carbon dioxide levels will fall to the point at which C3 photosynthesis is no longer possible. All plants that utilize C3 photosynthesis (~99 percent of present-day species) will die.
I read a good book that covered the sun expanding scenario. I don't remember the time line but at some point in its lifetime the sun will grow larger and swallow Mercury and the earth will become too hot to sustain life.
I think this is the scenario you're asking about and others have answered, but in the book he points out that over the vast time scales involved, it's not a very big deal for a space faring civilization to move the Earth out to a safe distance then back in when the sun shrinks.
I would have expected some kind of Star Trek level technology, but he describes how to use a simple Gravity tractor (not to be confused with a Tractor Beam) to adjust comets flight paths to speed up the earth (the reverse of the gravity slingshot used to speed up our current space probes) moving it further away from the sun.
So to answer your original question assuming the human life on earth is still advanced and spacefaring, human life on earth could last until the sun burns out and maybe a bit beyond that.
I would be very surprised if the sun ever ends all life on Earth.
1) If we care about the Earth we will move it. If we are still around by then it certainly will be within our technology.
2) I would say the most likely outcome (assuming we survive) is that the Earth gets taken apart for building materials. It's an awful lot of mass simply being used as a gravity source--incredibly inefficient.