Should I agree to referee a paper when I don't feel I can judge its importance?
I also started reviewing just recently (pure Math; mainly Algebra/Combinatorics) and when writing my first review with some assistance from my advisor, she taught me that it is not the reviewers job to judge if a paper fits well into a journal or not, that is the editors job.
Apart from checking the paper for correctness, giving helpful comments to make it nicer, etc. you can and should of course also judge it. However, I would not say "this is a good fit for journal XY because ..." but rather something like "this paper is really well written and generalizes the prominent result by A. and al." Or, if it is not well written, then you might also say that, e.g. "while the paper seems technically correct (up to minor points listed below), the page long calculations make it hard to follow and the authors fail to give an abstract overview of what they are doing."
The editor will then decide if the paper should be published in the journal or not, taking into account all reviews, maybe also how many papers were sent for this issue, etc.
Of course, as user2768 pointed out, you can let the editor know that while you will happily judge the correctness and readability of the paper, you are still to junior to properly give a statement on its expected impact.
That is totally ok and editors are aware that there isn't an infinite amount of perfect reviewers, who can comment on every aspect (in finite time...).
I would suggest that you also discuss this topic with your PhD-advisor; if he/she is willing to, you might even let him read over it before you send it.
Go for it. Suitability for journal is one aspect and not the entire review. Your technical comments, as someone familiar with the field and who has worked in it will be valuable. There's always a first time for review, and I think most researchers do hesitate that time. But it will be a good learning experience in putting your thoughts down and communicating in a scientific manner. Do run it by your guide once, as suggested by Dirk and Yemon. They will help you put your thoughts in an acceptable and helpful manner.
If you are worried about your ability to judge the importance of this work vis-a-vis other current papers, maybe you could err on the side of caution (have a slight positive bias rather than negative) in those particular fields. Judging importance is subjective, and the editor will make the final decision.
I would go for it. Sounds like you have a pretty good handle on the topic both from what you said about this paper and what your contribution was to your own paper.
I wouldn't sweat the importance subject so much. The editor can handle that more than you. (But can't handle looking at the content as well.) If it is some top/top journal (math equivalent of Science/Nature), the editor will have his own filter (e.g. "no papers on cuprates unless they superconduct"). If it is a middling journal, who cares.
You can also use it as an opportunity to go learn something. Scan that journal and just make your own assessment of importance. You learn MORE from making a guess and being wrong/right and learning it than from refusing to make a guess.
But I would lean towards approving the paper if the work is correct and not worrying so much about the importance. Just my two pennies. Very cool that you were contacted, you are in the game.