Meaning of fermi level related to distance to valence/conductance band Is there any practical meaning of the Fermi level? In the below image we can see how it behaves when p and n-material connect: It basically holds a constant value(?).
Can we draw any meaning out of that?
And (why/how) does it matter that the fermi level is closer to the conduction band in the n-side and closer to the valence band in the p-side?
As the fermi level is always within the band gap which is a forbidden region, does it play a (practical) role at all?

 A: The Fermi level is based on the probability of finding an electron at a particular energy level - the theoretical energy where the probability is 50%. In an n-type material there are additional electrons that fill the conduction band. This means that the energy at which you have a 50% chance of finding an electron is increased, closer to the conduction band. The opposite is true for p-type materials, which have electrons removed (or additional holes).
For your first question, in order for the p-type side and n-type side to be at equilibrium, i.e. in an unbiased state, the fermi level must be equal across the junction - so the p-n junction forms around the constant value of the fermi level. As soon as you bias it, the fermi levels can split and allow current flow. The Fermi level position in both materials therefore determines the extent of the band bending and, once biased may affect parameters like the voltage available from the junction.
I hope I've answered the questions you had, I'm happy to add additional clarifications if you'd like.
