HTML 4.01 (1999) specification suggests using MIME type text/javascript (http://www.w3.org/TR/1999/REC-html401-19991224/interact/scripts.html#h-18.2.2.2).
However, RFC 4329 (2006) now recommends the use of application/javascript.
It seems that historically text/javascript was used a lot and since it was the type that browsers most likely supported, this was the type that got suggested also in the HTML specification. Ideally, you would use application/javascript.
In practice you may need to use text/javascript to provide compatibility with less-conforming browsers.