A photoelectrochemical cell comprising: a semiconductor electrode including a conductor, a first n-type semiconductor layer that is disposed on the conductor and has a nanotube array structure, and a second n-type semiconductor layer disposed on the first n-type semiconductor layer; a counter electrode connected electrically to the conductor; an electrolyte in contact with surfaces of the second n-type semiconductor layer and the counter electrode; and a container accommodating the semiconductor electrode, the counter electrode and the electrolyte, wherein: in the semiconductor electrode, relative to a vacuum level, band edge levels of a conduction band and a valence band in the second n-type semiconductor layer, respectively, are higher than band edge levels of a conduction band and a valence band in the first n-type semiconductor layer, a Fermi level of the first n-type semiconductor layer is higher than a Fermi level of the second n-type semiconductor layer, and a Fermi level of the conductor is higher than the Fermi level of the first n-type semiconductor layer; and the photoelectrochemical cell generates hydrogen by irradiation of the second n-type semiconductor layer with light. a semiconductor electrode including a conductor, a first n-type semiconductor layer that is disposed on the conductor and has a nanotube array structure, and a second n-type semiconductor layer disposed on the first n-type semiconductor layer; a counter electrode connected electrically to the conductor; an electrolyte in contact with surfaces of the second n-type semiconductor layer and the counter electrode; and a container accommodating the semiconductor electrode, the counter electrode and the electrolyte, wherein: in the semiconductor electrode, relative to a vacuum level, band edge levels of a conduction band and a valence band in the second n-type semiconductor layer, respectively, are higher than band edge levels of a conduction band and a valence band in the first n-type semiconductor layer, a Fermi level of the first n-type semiconductor layer is higher than a Fermi level of the second n-type semiconductor layer, and a Fermi level of the conductor is higher than the Fermi level of the first n-type semiconductor layer; and the photoelectrochemical cell generates hydrogen by irradiation of the second n-type semiconductor layer with light. in the semiconductor electrode, relative to a vacuum level, band edge levels of a conduction band and a valence band in the second n-type semiconductor layer, respectively, are higher than band edge levels of a conduction band and a valence band in the first n-type semiconductor layer, a Fermi level of the first n-type semiconductor layer is higher than a Fermi level of the second n-type semiconductor layer, and a Fermi level of the conductor is higher than the Fermi level of the first n-type semiconductor layer; and band edge levels of a conduction band and a valence band in the second n-type semiconductor layer, respectively, are higher than band edge levels of a conduction band and a valence band in the first n-type semiconductor layer, a Fermi level of the first n-type semiconductor layer is higher than a Fermi level of the second n-type semiconductor layer, and a Fermi level of the conductor is higher than the Fermi level of the first n-type semiconductor layer; and the photoelectrochemical cell generates hydrogen by irradiation of the second n-type semiconductor layer with light.