Can we compare the electron shells with the orbits of the planets around the Sun, is this a good comparison?
Is it true for all the atoms that they can have only 2 electrons on the first shell, but why is it so, why 2?
Can we compare the electron shells with the orbits of the planets around the Sun, is this a good comparison?
Is it true for all the atoms that they can have only 2 electrons on the first shell, but why is it so, why 2?
The comparison with planets is problematic. In fact, it's so problematic that it's one of the reasons that the development of quantum mechanics was necessary and this classical picture of the atom was entirely discarded. If the electrons were like planets, they would act like rapidly spinning charges. That would cause them to radiate out a lot of energy. As they lost energy they would crash into the nucleus - and so destroy the atom in a flash of radiation almost instantly. In short, atoms simply could not exist if they acted like planets.
This is why the shells "exist" in the first. The shells are the only place an electron can go. The first shell is the lowest energy an electron can take, which stops it crashing into the nucleus as it would if it were circling it like a planet.
As for the second half of the question, it is true that the first shell contains, at most, two electrons. You really need to learn a bit more about quantum mechanics and quantum numbers to really get to grips with why, though.
Perhaps the shortest answer is that these "shells" you're talking about are not a complete picture of the structure of electrons in an atom. Each shell is divided into smaller parts called orbitals and each orbital can contain two electrons. It happens that this first shell contains only one orbital - so it takes two electrons. The second shell has four orbitals (one that is similar to the orbital in the first shell and three others) - so that adds up to eight electrons in the second shell.
You can see this implied on some of these "shell" diagrams where electrons are grouped in pairs, representing how each orbital has two electrons:
The reasons behind all of that would make for a far longer answer, though. That would range from "because that's what the quantum numbers say" to "because those are the solutions to Laplace's equation say" and more. Which I think is a bit beyond the scope of what you're asking right now, but I think it is more or less thoroughly covered here if you need it.
We can compare the orbitals of electrons to the orbitals of planets, and although this is not a perfect model, it can be useful(such as looking at electron velocities in a similar fashion to planetary velocities, subject to relativistic effects Why is gold golden?). One use is to find the escape velocity of the electron, treating it like a planet trying to escape orbit. So yes, we can usefully make such a comparison.
Secondly, the answer to your question is multi-layed. In maths, 5+5+5+5+5 is equivalent to 5x5 could be seen as 5 rows of 5, in total 25 objects. Alternatively, it could be represented as 52, and later we know that when multiplying by the same base, you add the indices: 51 x 51 = 51+1 = 52
In a similar fashion, shallowly its given that there can only be 2n2 electrons per shell, where n is the shell number. For the first shell, 11 = 1 so 2n2 = 2x1 = 2 This also gives the second shell to have capacity for 8(2x2x2) and the third as 18(2x3x3).
On a deeper level, in Quantum Mechanics, electrons have 4 quantum numbers(http://en.wikipedia.org/wiki/Quantum_number) which are the coordinates (n, l, ml, ms). Any electron in an atom can be represented as combinations of these 4 quantum numbers. The first, n, is the shell number, just like before. The middle 2 numbers, L and mL are complex, but eventually cause the n2 part of the equation.
The last number, ms is its spin. An electron can either be in spin 'up' or 'down', only 2 states are possible. This is where the 2 comes from in 2xn2, as for every combination of (n, l, ml) there is two possibilities, one where the fourth is 0(meaning spin is 'down') and another when it's 1(where spin is 'up). Due to the Pauli exclusion principle(http://en.wikipedia.org/wiki/Pauli_exclusion_principle), no two electrons can have identical Quantum Numbers. This means atleast one of the 4 must be different. Due to this, once all of the combinations of the first middle two have been filled in a shell, and once an equal number with the opposite spin(but same middle two quantum numbers) have been filled, the first number, n, must change to accommodate more electrons. This establishes the limit for electrons per shell as 2n2.
Keep in mind the 2n2 limit applies only to shells other than the valence shell(outer most shell). The valence shell is ruled by the octet rule that places the limit at 8 for the outermost shell. This is also ruled by the orbitals and the energy to fill the shells, but that requires a deeper understanding.