The book Red Scarf Girl is an autobiography explaining the authors experiences during the cultural revolution. Ji-li Jiang, author of the book, was born in 1954. When she was 13 her father was falsely accused for listening to foreign radio. Her father was sent to a labor camp and was forced to work for the government. At school she was humiliated for her families anti communist past which prevented her from becoming a Red Successor. Her family then moved to Hawaii where she learned english and wrote the book Red Scarf Girl (Ji-li Jiang - Wikipedia).
The cultural revolution was a social/political movement that lasted from 1966-1976. The goal of the revolution is to preserve the true Communist Ideology of China. The Cultural Revolution started when a group wanted to restore capitalism. These people were called revisionists and they were to be removed but resulted in a long struggle of all classes (Cultural Revolution - Wikipedia).
The answer to the question is quite obvious. The cultural revolution influenced the book immensely. Without the cultural revolution the book not have been created because the author wouldn't not have been motivated to create the book.
Image 2) Source