Start thinking about your thesis research project as early as possible, e.g., by developing research expertise through UROPs. Be alert to interesting problems that come to your attention in class, personal contacts, or through the technical literature.
The best time to start defining a thesis project is during 6.UAT. Undergraduates planning to continue for the M.Eng. should try to get involved in a research group (through UROP, initially) as early as the sophomore or junior year. It is particularly important for students interested in continuing for the Ph.D. to gain exposure and experience in research. (Being involved in a research group long-term is the best way to improve chances for funding as a Research Assistant for the M.Eng.) Some faculty feel that there is a long period of apprenticeship during which the student's training requires more effort than is returned by the student's labor. Only after this period does the 'payback' begin. It is in that 'payback' period that most supervisors expect to find the student's M.Eng. thesis work.