I have a pretty mediocre memory, so when I need to remember something I write it down. The act of writing helps, and if I can keep my notes organized, then it's there next time I need it. Also, if you really do need to memorize your theorems (for a test, for example), talking to yourself helps -- I used to review math to myself out loud in the shower and while walking to class. Of course, you do risk being mistaken for a crazy mathematician that way ...
Those are both pretty generic pieces of advice, so here's some specific to math. I found that time spent understanding definitions was more useful than time spent memorizing theorems. If you only have a shaky grasp on what the words in a theorem mean, it's hard to remember it. A trivial example is that my calculus students always have trouble remembering that log(ab) = log(a) + log(b), but log(a+b) isn't log(a)log(b). And unless you understand log and its relation to exp, there's no reason to think one should hold but not the other. In this example, knowing a little history can help too; logs were used heavily by all scientists until about 50 years ago, because they make arithmetic reasonable, by turning multiplication into addition and exponentiation into multiplication. So I try to get my students to remember that logs make hard things easier; then they have some framework to put this identity inside.

