Point of note is that transistors are used in all three cases (flash memory, RAM and the CPU), but the voltage levels for 1's can be different in each case. The voltage level is part of the design of the flash/RAM/CPU. (For example, when designing a CPU, choosing a voltage level is a tradeoff between performance (higher voltage implies faster clock speeds) and power consumption (higher voltage drains the battery more)).
If you're asking when the 0's and 1's became voltage levels, the answer is that they were created as voltage levels in the first place. At the physical level, the 1's and 0's are always voltage levels. When you compiled your code, the code generated by the compiler was represented as voltage levels in the CPU, then was written to RAM, which again was in voltage levels, and then written to the SSD of your MacBook Air, which again is in voltage levels.