Do be careful, though. Some other folks here are saying, correctly, that this glosses over the "direct" or "indirect" nature of a semiconductor. I only very slightly alluded to this when mentioning the relationship between energy and momentum.
Trying to make a long story short, it can be the case that in order to transition to another energy level, an electron also has to exchange momentum with something, usually the lattice in the form of quantized vibrations. Photons carry energy but almost no momentum, so an indirect semiconductor (one that requires both energy and momentum exchange for a transition to the conduction band) is usually an abysmal choice for optoelectronics.
Trying to make a long story short, it can be the case that in order to transition to another energy level, an electron also has to exchange momentum with something, usually the lattice in the form of quantized vibrations. Photons carry energy but almost no momentum, so an indirect semiconductor (one that requires both energy and momentum exchange for a transition to the conduction band) is usually an abysmal choice for optoelectronics.