We get our spelling rules from all over the place, so the simplest answer is just to learn the spelling as you go.
However, often a double-letter means the first vowel is kept short - you'll see this when we make forms such as hitting and stopping. Without the double-letter, the first vowel in the examples would be read as long. This is why we use "writing" (it keeps the long i) and consider "writting" (short i, not a word) a mistake.
If you wrote "letter" as "leter", I'd try to pronounce it as "litre" or "later". Completely different words.
Of course, this is not a blanket rule. "Prominent", for example, has a direct Latin origin and basically follows spelling rules from Latin. "Letter" underwent several changes as it was passed into English via French.