In Girl on the Train, Rachel sees Scott kissing Megan.
Is this scene related to the plot or is it sidetrack of plot?
It is important to the plot because Rachel believes Megan and Scott to have the perfect marriage. She sees their relationship as the one she wishes she had with her ex-husband Tom. The scene shows us, the viewer, the same perspective that Rachel has of Scott and Megan's "perfect marriage".
The mental image she has of Scott and Megan's perfect marriage is what makes her so angry when she sees Megan ruining her "perfect marriage" by kissing Abdic, the psychiatrist. This leads her to confront Megan which sets off the whole series of events that make up the rest of the movie.
For a summary of the plot of the movie, try checking out Wikipedia.