I'd say нужно and надо было are more about your own choice, your decision and пришлось is more about reasons beyond your control. Мне нужно было уйти = мне надо было уйти (because I wanted to meet a friend, for example). Мне пришлось уйти (because there was bad weather). I think this is only one difference.