When I go through textbooks should I write out solutions to the exercises? Or is it fine if I just do it in my head? I mean either way you are still doing the problems right?
I can't tell you what to do, but for me, I cannot overstate the benefits of writing things out! The things I learn seem to stick much better when I write them out on paper. I take notes all the time when I'm reading as well. Even if I don't save what I've written, it helps.
Maybe this is just me... I don't know, but as I said, for me this really works. Since I started doing this I remember things a lot better, especially definitions and conceptual stuff.
I'd recommend going through it in your head for the mental exercise. Then, write it out so you can prove to yourself you did it right. Also, if you write it out, it'll be easier to recognize patterns you can use to solve future problems.
Finally, you'll need to get used to showing your work because when you get to the real world, people are going to count on you to show them how you arrived at your conclusions. Writing out your work now is good practice.
Another note, you may want to be able to show your work to prove you didn't make the error that crashed the Mars orbiter. It's pretty hard to prove your math was right when you can't show someone your work.
Oh, a final final note, if you are good at writing out your work, you're more likely to get partial credit on tests. If a teacher sees that you understand the process but you accidentally transposed a few numbers or something, you'll probably get a handful of partial credit instead of missing the entire question.
The following is from Bill Johnson's answer to the Famous Mathematical Quotes question at Mathoverflow:
Jean Bourgain, in response to the question, "Have you ever proved a theorem that you did not know was true until you made a computation?" Answer: "No, but nevertheless it is important to do the computation because sometimes you find out that more is there than you realized."