What're we writing? We're writing a てがみ(letter). How do we we're writing a てぐみ? Because we see the を after it, that's why. Place を after the thing crucial to the verb in use. If I said to you "I'm writing", you'd ask me what the heck I was writing. That what-the-heck-you're-writing needs an を after it to be beautiful Japanese.
The common [A]は [B]です grammar construction where we're describing something about [A]. What about [A]? [B] of course! [A] is [B] = [A]は[B]です。Or in a crazy hybrid of wrong that slaughters everything that Mr. Grammar stands for: おちゃ is おいしい!
A common grammar construct to express you like [something] is [something]が+すきです。When using すきです, you'll mark the item you like with が.
を lets the listener know which thing in your sentence you're going to eat. i.e., [cake]を たべます and not [Cake]は わたしを たべます because that'd just be plain scary having a world where cakes ate us.