High school senior Carson Phillips (Chris Colfer) is randomly struck and killed by lightning in the opening scene. His mother Sheryl (Allison Janney) is notified of his death, and there is a horrible memorial service. The now deceased Carson narrates the story of his life. As a child, he withdrew into writing in order to escape from his parent's destructive marriage. After his father left, he and Sheryl were all on their own. By the time Carson is seventeen, his loud, wisecracking mother resorts to seeking solace in drinking and prescription drugs. Carson himself is clearly disdained by practically everyone who is in his school, most likely for his sarcastic and often rude demeanor. He desires to go to Northwestern University in order to one day become the youngest editor for The New Yorker, but so far is having limited success in making those dreams happen.
One day during a writer's club meeting, Malerie Baggs (Rebel Wilson), a fellow student who likes to videotape everything, comes in to get advice about her short stories. Carson tells not to give up, and says that she can't find the ideas, the ideas have to find her. He later goes to a student council meeting run by head cheerleader Claire Matthews (Sarah Hyland). Claire, as well as everyone in student council, resort to ignoring him due to his constant objections to their ideas. While Sheryl is picking up several prescriptions, she makes idle small talk with the cheerful new pharmacist April (Christina Hendricks), who is six months pregnant. Carson also visits his grandmother (Polly Bergen), the first person who encouraged his writing, but she doesn't know who he is due to Alzheimer's. She talks to him about how her grandson used to be so happy and full of life, but was now his own personal rain cloud. At home an intoxicated Sheryl marvels at the fact that Carson is young enough to make something out of his life. April is then shown talking to Carson's father Neal (Dermot Mulroney) about her earlier encounter with Sheryl. Neal assures her that not to worry about what other people do, and that their baby will be brought into the world by two loving, sane parents.
As Carson is finishing up the school paper late at night, he accidentally catches fellow students Nicholas Forbes (Carter Jenkins) and Scott Thomas (Graham Rogers) having a tryst in the bathroom. Nicholas begs Carson not to tell anyone since his rich family would disapprove of his homosexuality. Carson promises not to tell anyone in exchange for them contributing to the paper until they all graduate. April and Neal visit Neal's lawyer to straighten out some legal issues. April, who had no knowledge about Carson or Sheryl, storms out when she learns Neal is still legally married. Carson's guidance counselor (Angela Kinsey) informs him that one way to improve his chances of getting into Northwestern is to submit a literary magazine in order to show he can inspire others to write. He gets permission to start the magazine from his conservative principal (Brad William Henke), but has to find the necessary funds on his own. After getting an unexpected call from Neal, Sheryl races to clean herself up. During their short meeting, she begrudgingly signs the divorce papers, and then goes to see her doctor. He advises giving Carson anti-depressants, claiming they would improve his mood, and therefore make him less eager to leave for college.
When she brings up the subject during dinner, Carson quickly rebuffs her, saying that people today would rather use drugs than actually solve their problems. Sheryl tells him that during much of his childhood, he was unknowingly on ADHD medication. Despite this, Carson agrees to take the anti-depressants in exchange for the $300 he needs to print the magazine. He announces at a school assembly that all entries will be taken, but later finds the submission box filled with nothing but trash. Malorie comforts him by using Nicholas and Scott as examples of how he can persuade others into caring about writing. Carson tells her the real reason behind their participation in the paper, and she reveals that she caught Claire having sex with Coach Walker (Charlie Finn) who is also the brother of her boyfriend, Justin (Robbie Amell). Malorie goes on to say how everyone in their school probably has an embarrassing secret that they wouldn't want to get out.
Sheryl has another run-in with April when April recognizes Carson's name on the anti-depressant prescription. She then comes home to Neal and demands to meet his son. During the homecoming parade, Carson is forced to pull the writer's club float himself after the cheerleaders take the car they were assigned. Feeling more humiliated than ever, Carson decides to blackmail several of his peers into writing for the literary magazine. He tricks yearbook president Remy Baker (Allie Grant) into sending him a dirty picture that could ruin her reputation. Together, he and Malerie blackmail fellow school paper members Dwayne (Matt Prokop) for bringing marijuana to school, and goth girl Vicki (Ashley Rickards) for taking BDSM-style pictures that her church-going parents would disapprove of. Carson additionally discovers that supposed foreign exchange student Emilio (Robert Aguire) is from San Diego, only knows rudimentary Spanish, and is using his faux-exotic charm to seduce the principal's secretary.
During a meeting with the other students (and Coach Walker), Carson explains that every person must offer something to put in the magazine if they want their secret to stay quiet. Carson also tells Claire and Coach Walker that they must have each cheerleader and football player submit something as well, as a way to make the issue more popular among the student body. Each person writes something that reflects the personal issues they are currently dealing with. Nicholas writes a poem expressing how money won't get in the way of his feelings for Scott, Justin writes an essay about why he loves football so much, and Remy writes a short story over her parents' financial difficulties. When Claire submits her piece, she berates Carson for acting so superior to them just because he knows he can escape to a better life. Carson tells Claire that he remembers back in second grade how she badly wanted to be a ballerina, but for whatever the reason decide she was not good enough.
After school, Carson gets an unexpected call from his father. Neal tells him about April, the baby, and how he wants them to get together soon. When he has dinner with Neal and April, Carson realizes that his father is trying to make himself sound like he has been more present in Carson's life, which quickly results into an argument. Neal defends his decision to leave since Sheryl was unstable, but Carson retorts that leaving him alone with her was not the right decision, and storms out. Later during a student council meeting with the principal, Carson vocally opposes a ban on clothing logos in school. As punishment, the principal revokes all off-campus privileges for students. Everyone else claims the entire school will actually hate Carson for what he did, but he defends himself by saying that they all would rather keep quiet than stand up for themselves.
Sheryl sees April yet again, and says that she knows she looks like some pathetic divorcee who refuses to get on with her life. She explains that she gave her husband everything, and was therefore left with nothing when he decided she wasn't enough for him. Just like April, Sheryl had a kid to keep him around, but that didn't change anything. Meanwhile, Carson completes the literary magazine, but it flops due to the backlash from the student body. Carson also learns that he was accepted into Northwestern, but since he never confirmed his admission, he must wait to reapply and go to community college in the meantime. Carson assumes his letter was lost in the mail, but after telling his mother, Sheryl admits she threw away his acceptance letter to protect him from the reality that his dreams will probably never come true.
While Carson and Malerie pack up the unread literary magazines, Carson asks her why she likes to film everything. Malerie replies that "It doesn't matter if you're stuck in the past or if you're trying to forget the past, what matters is what you do in the present." As Malerie is leaving, she asks Carson if he thinks they're friends. He says they're best friends. Carson suddenly decides that there's one story left to write; his own. While his voice over explains how he finally realized that despite everything he went through, he successfully got the other students to write for the literary magazine, so for the first time in his life, he was truly happy. He is then shown going outside as the thunder starts.
It takes over three days for people to find Carson's body. Sheryl repeatedly calls his phone after the police come, saying she just needs to know he's okay. Many people, including the principal and the students who hated him, come to the funeral. It's shown that for the most part, Carson did leave an impression on everyone he knew. Malerie takes over as president of the writers' club, while Sheryl visits her mother in assisted care. Carson explains that life comes at you fast. It goes right through your body, and in an instant it's gone. It's a lot like lightning.
Information from Wikipedia