Pens are fine for math. I often used a fine point gel pen in college. However, you have to have a high degree of confidence in what you're writing. If you make a lot of mistakes (either actual mistakes or just wrote down something incorrectly or with a misspelling), then pencils are definitely better.
I got to a point where I would just write down all my solutions on a final paper to turn in for my math assignments.
I did everything in pen, bc of handwriting issues and pencils. I simply burned through sheets and sheets of paper with my preliminary work- then copy everything to something both legible and presentable.