Well, "ein Brief" is in accusative because it's the direct object of the verb - meaning it IS the thing that you actually do the action to. Same as in "I am hitting the boy." or as "apple" would be in "I am giving the apple to the boy", or "I see the boy".
"An deinen Vater" is also accusative, but this time it's because the preposition "an" requires the accusative case here.
The preposition "an" can require the dative case also, but that is only when specifying location (and not direction). Example: Ich sitze am (=an dem) Tisch.
The reason why the preposition "an" and not another one is used here, is because of a property of the verb called "rection" if I'm not mistaken.
For "rection" or "government" (linguistical notion) check out the wikipedia
The wnglish word "whom" translates to both the german "wem" and "wen". English has lost this distinction entirely, so don't rely on analogies for help there :)