First of all, they’re very important to each other. They both meet up at a point where they both need an ally - an ally that they both expected to have in the Doctor, but that he was in no place to be. There’s a lot of parallels between them during The Year That Never Was: they’re both hopelessly in love with the Doctor, they’re both well aware that the feeling is not returned but hope otherwise, they’re both treated terribly by him, and they’re both willing to forgive that mistreatment towards themselves.
However, they are not willing to forgive that mistreatment towards someone else, and that’s where they become vital to each other. They see that they’re not the only ones he treats callously (and Jack further sees this in what he pieces together of the Doctor and the Master’s past history), and that he isn’t going to magically wake up one day and treat them the way they actually deserve. Seeing how the other pines for the Doctor and is still, at best, ignored (and at worst, used and borderline abused) allows them to grow beyond the Doctor. It gives each of them the strength to say “no, actually, I deserve better than this, so I’m getting out.”
After the Doctor, they’re still very important to each other, still each other’s allies. It’s implied that Jack and Martha keep in touch, and that I think is a good thing for both of them. We don’t know what immediately after the Valiant to Martha, but for Jack, he has a pretty awful reunion with first his team, then John, and then finally Gray. All whilst processing the fact that the man he waited for over a century for could hardly bear looking at him anymore. If he hadn’t been able to call up Martha from time to time and just vent, I don’t think he would have had the strength to keep going. Even if he never gave her the full story of what was going on, even if he could only say ‘Gwen was getting pissy with me today’ when what he really needed to say was ‘they managed to replace me in the one place I thought I was genuinely needed,’ it’s more than he’s ever had before since Satellite Five.
And they keep that friendship going too. In the radio play “Lost Souls,” Martha pulls Jack aside to get him to talk about losing Tosh and Owen. And he actually opens up!! It’s brief, but that makes sense since they’re trying to prevent the universe from being ripped open at the time. It’s still huge that he even acknowledges that he’s hurting to someone.
There’s so much to their friendship, and I kinda wish we saw more of it from Martha’s PoV, but they are so good for each other, not just in a time when they desperately needed someone else, but also in the better times when they’re back within their normal support structure.