Not only that. It has most if not all the same functions that a regular class has. Variables, methods, signals and such. This allows you to have better structure in your code.
For example, I may have a custom particle system script ('cause the CPUParticles node isn't enough :/) and I need to store the particles. An inner class would be perfect for this. Not only can it store stuff like position and velocity, but can also have its own methods to interact with other particles.