Both seems to mean 'to be difficult' or 'to be hard'. Is there a difference between them, in meaning or in usage (spoken/written, formal/informal)?
In many cases, they are interchangeable. But 힘들다 is more focusing on the amount of effort you have to pay, especially physical effort. 등산은 힘들다(Hiking a mountain is hard) can be a proper example.
Comparing to it, 어렵다 is more focusing on intellectual efforts, or lack of your ability. Usually 힘들다 proposes you can achieve what you want to if you do your best. In contrast, 어렵다 is used when you can't do or get something even if you do your best, because of lack of your ability. 이 시험은 나에게 너무 어렵다(The exam is too difficult for me) is very natural, but 이 시험은 나에게 너무 '힘들다' is a little bit awkward, though everyone can understand what you mean.
I would just like to add something to the excellent answer posted above
From Naver's online dictionary for 어렵다:
어렵다 [어렵따] 발음 듣기 중요 [형용사]
1. 하기가 까다로워 힘에 겹다.
2. 겪게 되는 곤란이나 시련이 많다.
3. 말이나 글이 이해하기에 까다롭다.
[유의어] 딱하다, 힘들다, 가난하다
So 힘들다 and 어렵다 seem to be synonyms
However 힘들다 is formed from 힘이 들다 which implies physical demand for performing a task
어렵다 is more related to the inherent difficulty of a problem
Here is a collection of sample sentences which might help in grasping the differences between the two: