Generally, for all intents and purposes, they mean the same thing and all four of your examples are fine.
They do have a slightly different meaning, though.
on the computer
This specifically means that the person was using the computer. There's no question about whether the person was actually writing the email in a program on the computer.
at the computer
This implies that someone is immediately in front of the computer but does not necessarily require that someone is using the computer.
Writing emails pretty much requires the use of a computer, so in this case, the meanings are identical but, if I change the action slightly:
She was on the computer taking notes for class.
This pretty much means that she was taking notes using her computer.
She was at the computer taking notes for class.
This could (but does not necessarily) mean that she was using the computer to take notes but it could also mean that she was using the computer to get the information for her notes but was actually writing them down on a piece of paper or in a notebook.