Light-driven modulation of neuronal activity at high spatial-temporal resolution is becoming of high interest in neuroscience. In addition to optogenetics, nongenetic membrane-targeted nanomachines that alter the electrical state of the neuronal membranes are in demand. Here, we engineered and characterized a photoswitchable conjugated compound (BV-1) that spontaneously partitions into the neuronal membrane and undergoes a charge transfer upon light stimulation. The activity of primary neurons is not affected in the dark, whereas millisecond light pulses of cyan light induce a progressive decrease in membrane resistance and an increase in inward current matched to a progressive depolarization and action potential firing. We found that illumination of BV-1 induces oxidation of membrane phospholipids, which is necessary for the electrophysiological effects and is associated with decreased membrane tension and increased membrane fluidity. Time-resolved atomic force microscopy and molecular dynamics simulations performed on planar lipid bilayers revealed that the underlying mechanism is a light-driven formation of pore-like structures across the plasma membrane. Such a phenomenon decreases membrane resistance and increases permeability to monovalent cations, namely, Na+, mimicking the effects of antifungal polyenes. The same effect on membrane resistance was also observed in nonexcitable cells. When sustained light stimulations are applied, neuronal swelling and death occur. The light-controlled pore-forming properties of BV-1 allow performing "on-demand" light-induced membrane poration to rapidly shift from cell-attached to perforated whole-cell patch-clamp configuration. Administration of BV-1 to ex vivo retinal explants or in vivo primary visual cortex elicited neuronal firing in response to short trains of light stimuli, followed by activity silencing upon prolonged light stimulations. BV-1 represents a versatile molecular nanomachine whose properties can be exploited to induce either photostimulation or space-specific cell death, depending on the pattern and duration of light stimulation.