Many authors use irony to impact the story in different ways. Sometimes the author makes the tone very pleasant and dreamy, like every thing is good and ok, when all of the sudden the story is flipped completely, changing the whole outcome of the story. Irony can also be used in a much more subtle way, for example it doesn't change the entire story, it just makes the reader think about what just happened a second time.
For example, Ambrose Bierce's short story, "An Occurrence at Owl Creek Bridge" has very ironic elements to it. Just about the whole story itself is quite ironic. Peyton Farquhar, the main charter, is being hung. In the seconds of dying, he stretches the couple of seconds out into a long-lasting dream. He imagines himself swimming away while dodging bullets, and then he gets into the forest where he must make a long and miserable trip back to his house.
Just as he is about to reach his wife's arms his neck breaks and he dies, but he didn't die there, he died long ago at the bridge. Bierce makes you truly think that Farquhar has escaped from death, but just as you think you are going to witness a happy ending, you figure out Peyton Farquhar has died at Owl Creek Bridge.
Another example of irony in the short story "An Occurrence at Owl Creek Bridge" was when the Union solider dressed as a Confederate soldier so easily convinced Farquhar to attempt to burn down the Owl Creek Bridge. All he had to do was mention that the bridge could easily be burnt down from one side. He was really a Union soldier trying to, in a way, trick Farquhar into giving up his life, and it worked fairly easily.
Another short story that has some very ironic parts to it is Stephen Crane's "The Blue Hotel". One of its ironic points is when the Swede is in the pub. He is starting to get drunk and asks a small group of men in the pub to come have a drink with him. They say no and eventually the drunken Swede goes over and puts his hand on one of the men's shoulder and ends up strangling him. This forces the man to pull out a knife and stab the Swede, which ends up killing him. All the Swede wanted was someone to drink and have a good time with, but oddly enough, this ends up costing him his life.
Another very ironic point to "The Blue Hotel" was what all the Swede went through when he accused Johnnie of cheating in a game of cards. He got into a fight with Johnnie and then left the hotel from which he got stabbed and killed. The Swede lost his life over a little accusation of cheating. Later on in the story we learn that his acquisition turned out to be true; Johnnie actually did cheat at the card game, just nobody believed him over Johnnie because everyone has known him for a long time, but the Swede was just some random guy that thought everyone was out to get him.
Irony can be used in different ways, some very dramatic, and some just to add a little kick to the story. Bierce used irony in a very direct and in a way that it completely changed the plot. He used it so that an almost seemingly happy ending turned into a very sad ending in the blink of an eye. Crane's use of irony sort of adds to the story without completely changing it. It makes the reader feel sort of bad for the character, making them feel if just this little change would have occurred, everything would have turned out happy. Irony is a very strong tool that can be used is to enhance the story and even to fool the reader sometimes.