To be properly understood, these verses—and Luke 17:34-36 as well—must be read in context. Starting in Matthew 24:21, Christ describes the Great Tribulation and the end-time events which would lead up to His return. In verses 37-38, He refers to the time of Noah. Just before the Flood, people were going about their daily business when disaster came upon them suddenly. Jesus says that in this respect the end time will be like the days of Noah (verse 39).
People will be living their usual lives, working in the fields, grinding at the mill, and so forth (verses 40 and 41) when end-time events fall upon them unexpectedly. This will be a time of such death and destruction that, unless God intervenes in world affairs, no one would survive (verse 22)! Circumstances will force people to choose to submit to God or continue their rebellion against Him. Unfortunately, Revelation 6:15-17; 16:9, 11 tells us that most will choose rebellion.
Matthew 24:40-41 can be applied in principle to another future event. At the beginning of Matthew 24, Christ's disciples specifically ask Him for a sign of His return and the end of the age (verse 3). In this light, verses 40-41 can be taken to mean that at Christ's return a separation will take place between those who attain to the first resurrection and those who do not (John 3:3-8; I Corinthians 15:50-53; Revelation 20:6).
However, a secret rapture is nowhere contemplated in either Matthew 24 or Luke 17, as some teach.