Neural activities can be modulated by leveraging light-responsive nanomaterials as interfaces for exerting photothermal, photoelectrochemical or photocapacitive effects on neurons or neural tissues. Here we show that bioresorbable thin-film monocrystalline silicon pn diodes can be used to optoelectronically excite or inhibit neural activities by establishing polarity-dependent positive or negative photovoltages at the semiconductor/solution interface. Under laser illumination, the silicon-diode optoelectronic interfaces allowed for the deterministic depolarization or hyperpolarization of cultured neurons as well as the upregulated or downregulated intracellular calcium dynamics. The optoelectronic interfaces can also be mounted on nerve tissue to activate or silence neural activities in peripheral and central nervous tissues, as we show in mice with exposed sciatic nerves and somatosensory cortices. Bioresorbable silicon-based optoelectronic thin films that selectively excite or inhibit neural tissue may find advantageous biomedical applicability.