Terminator 1 appeared to follow the predestination ideology, where going back in time meant that John Connor and Kyle Reese fulfilled their roles, rather than changing anything.
Terminator 2 played much more with the idea of both fate and free will. By exercising free will, the future was changed. Of course it can be argued that intent is meaningless and that both films should have changed the future.
Yet, it's also quite logical that if you can go back in time to change things, you must sometimes (inadvertently) fulfil things as well.
On an out-of-universe final note - the Terminator time line is a bit screwy. Any basic googling will show that. You basically have to take it or leave it :)
I would argue that James Cameron simply considered the concept of time travel much more in the second film.
To quote from a Terminator predestination paradox wiki:
The predestination paradox was an integral part of the first movie in
the Terminator franchise: The Terminator. There are two main examples
where a future time traveler goes back in time and fulfills their role
in history (rather than changing it):
- Kyle Reese fathering John
- The T-800
endoskeleton being left in the Cyberdyne factory.
The predestination paradox is heavily tied to the concept of fate. The
photograph of Sarah Connor by the Mexican boy is an example of this:
the photo that Kyle had in the future is exactly the same as the one
taken of Sarah at the end of The Terminator. This heavily suggests
that the events of The Terminator fulfilled the predestination
paradox: The Terminator and Kyle Reese traveled back in time to
fulfill their roles in history, not to change it.
Now, as many, many, many people have asked, how does this make any sense? Ultimately, the only reason John Connor is born is because he sends his father back in time to meet his mother, thus producing him - producing no end of apparent paradoxes. Quoting from the first article above:
Therefore, the only reason either John Connor or the machines exist is
because the Terminator went back in time, and the only reason the
Terminator went back in time is because the machines and John Connor
exist. Get it?
Oh, and John Connor and our heroes spend the last act of the second
movie trying to prevent said war, meaning John Connor is trying to
prevent his own existence, by eliminating the reason for his dad to
travel back in time to conceive him. And, if he does prevent his own
existence, well, he certainly won't be around to prevent the war thus
prevent his existence and...
Well, you get the idea.
Once we reach the second film though, suddenly this idea of predestination seems to change. Consider these quotes from the film:
Reese: Don't quit, Sarah. Our son needs you.
Sarah (struggling not to cry) I know, but I'm not as strong as I'm supposed to be. I can't do it. I'm screwing up the mission.
Reese: Remember the message... the future is not set. There is not fate but what we make for ourselves.
Also from the script:
Bathed in sweat, Sarah sits hunched over the table. Every muscle is
shaking. She is gasping. Sarah struggles to breathe, running her
hand through her hair which is soaked with sweat, She can escape
from the hospital, but she can't escape from the madness which haunts
She looks down at the words she has carved on the table, amid the
scrawled hearts and bird-droppings. They are: "NO FATE." Something
changes in her eyes. She slams her knife down in the table top,
embedding it deeply in the words...
John and Terminator ponders the message carved into the top of the picnic table. Sarah's knife is still embedded there.
John: "No fate." No fate but what we make. My father told her this... I mean I made him memorize it, up in the future, as a message to her -- Never mind. Okay, the whole thing goes "The future is not set. There is no fate but what we make for ourselves."
These lines become something of a motto in both Terminator 2 and the subsequent movies (e.g. "The future has not been written. There is no fate but what we make for ourselves." is the first line of Terminator 3).
This moment of recognition from John Connor certainly seems to signal a change in the series. At this point, free will and its ability to change things becomes more apparent. Consider shortly afterwards, when Sarah takes John to flee to Mexico. If she had done this, it's very likely the events of the future would have remained as they were.
This time, they exercised free will and actually changed the future (and their own fates).
This is a fascinating concept because, as you say, why was one set of actions to change the future and another wasn't? Now you're onto a greater philosophical question - what is free will and how do we know if we're exercising it? If all of our fate and destiny is laid out in front of us, how do we know if we can change it? If instead of taking Door A, we take Door B, how do we know we were't supposed to take Door B all along?
Ultimately, there are no real answers to these questions. What we do know, however, is that James Cameron certainly intended fate to play its part in the second film (whereas predestination seemed to be his focus in the first). We can tell this in two ways. Firstly, consider this quote from an interview with James Cameron:
Basically, what I did in Terminator 2 is say that everything is meant
to be a certain way. At least to that point in time where they're
sending somebody back from that future. But can you grab that line of
history like it's a rope stretched between two points, and pull it out
of the way? If you can pull it just a little bit before it rebounds,
and cut it exactly at that moment, then you can change it and go in a
different direction. If you do that you get a future that no longer
exists at all, except in the memories of the people that are here now.
Secondly, he originally intended the actions in the second film to completely change the future. This was presented in an alternate ending finally included on the DVD release, where Skynet has been destroyed and John Connor is actually a Senator (a transcript can be found here). However, he instead chose a more ambiguous ending, where the future was changed, but only to an extent. He explained this:
But there was a sense that, why tie it up with a bow? If the future is
changeable, then the battle is something that has to be fought
continuously. And you can't do it with a single stroke. That it's the
dualism, the dynamic between good and evil that's eternal.
In other words, although the future can be changed, it can't just be completely and totally changed - instead, it would be subtlety, gently changed into a new direction (which also, rather nicely, allows many more films!).