I think speaking in a foreign language requires a lot more confidence, and to write you just need to know the basics of the language. Even if you write something wrong, it won't be as uncomfortable or awkward if you make a mistake. As well as this, speaking means that as well as the language itself, the pronunciation, accent and fluency are also heard, so it can be a lot harder for some people.