Yes you could say "the temperature hit 30 degrees". (Include the article "the" to make it sound fluent.)
There is a small difference between that and "the temperature was 30 degrees"... "was" is just a neutral statement about the temperature. Saying it "hit" a certain number means that it usually wouldn't be so hot, but this time it is unusual and it made it to that extra high number.
Tim's comment is a good point, though... you should indicate C or F to mean Celcius or Fahrenheit if you're talking internationally.