3 * 3 * 3 = 27
The easy/overkill way
You could do this by assigning a pin to every LED (on an arduino Mega)
The overkill way
Use shift registers, almost any arduino will do.
The shift register will set it's outputs according to the amount of high/low signals being clocked in.
In theory, you can address an infinite amount of LED's (only limited by space, time or funds).
Breaking it down
You can break it down, so that you control each layer at once.
Effectively you only drive 9 LED's (1 layer).
And attach a transistor to the negative side of the layer.
This way you can choose a LED with the positive side, and a layer with the negative (per layer) control.
Switching these layers rapidly, will make the changes invisible to the eye. So it seems that the LED's are on all the time.
Combine the overkill way (shift registers) with breaking it down (to reduce cost/size) and you'll be able to create a (somewhat) scalable design.
There are an awfull lot of tutorials, I suggest you choose one you can understand, try to make a smaller cube, and scale up from there!
- You'll need a better powersupply for each series of LED's you add.
- Processing time, the arduino might not be able to clock the signals fast enough, making it visible for eyes. (depends on the amount of LED's)
Be sure to check/measure/calculate these things along the project.