The reason 256 is a magic number is because it is a power of 2. 2 is a magic number in computers because everything is based on whether or not there is currently electricity. If there is electricity, we represent that with 1. If there is not, we represent it with 0. That is two possible options. This one digit that consists of either a 1 or a 0 is called a bit.
When programming in an environment with limited resources, such as for DS, it is necessary to keep everything as small as possible. Using the example of missile capacity... the number of missiles you have must be stored somewhere in the game. The storage consists of eight bits that either have a charge or do not. There are a total of 2 to the 8th power, or 256 combinations of the bits having a charge or not. The reason 255 is the magic number in Metroid as opposed to 256 is because the game needs to account for having 0 missiles. If something starts at 1, it can count to 256.
Basically, the number of bits you use limits the number you can store. 8 is a popular number because it is one "byte" which is the root of the word megabyte and gigabyte that you hear a lot. In a computer you don't need to worry so much about the size of your numbers, so a lot of games don't limit their numbers to only one byte. On the DS however, if you limit your storage to only one byte then that could mean you have more area to store other things about your game.
This is all very simplified for the purpose of explanation. I could lecture forever so I'll stop now
If you are interested in learning more, go to college and study Computer Science (or just encourage me)