The 1M is the collector resistor for your darlington pair which I is simply working as a switch; the value is not really critical. Higher values will give lower current flow. The 100 ohm resistor limits the current into the LED so it doesn't get damaged by excessive current.