Jem does get a bit moody and irritable in the last part of the book, and it can be attributed to two main factors. The first factor is that Jem is getting older, and hitting puberty. Scout notes in chapter 23 that
"his eyebrows were becoming heavier and I notice a new slimness to his body. He was getting taller."
He also proudly shows her his first chest hair. Along with the physical changes that occur in puberty, there are the delightful hormones that make kids moody, irritable, sleepy and dramatic. The hormones are so bad that Scout notes, "Jem was the one who was getting more like a girl every day" instead of her. The hormones are all out of control and hard to deal with, so Jem is responding to that new aspect of his life.
The second reason that he is irritable is that he is upset about the outcome of the Montgomery case, and about the realization that people are racist and cruel. He was profoundly impacted by the guilty verdict, and it opened his eyes to just how unfair life was, and how awful people could be. At the end of chapter 26, Jem blows up at Scout when she is passing on the local racist gossip. He says he doesn't want to hear any more about it, or anything about the courthouse. He is sick of thinking about people's weaknesses and failings. Atticus comforts Scout, saying that Jem is "trying hard to forget" how awful people were, and as soon as he processed and thought about it a bit, he would be okay. So, growing up and realizing how tough life is also make Jem irritable.
I hope those thoughts helped; good luck!