The answer to this question is almost completely a matter of personal opinion. It hinges on your point of view and your definition of the word “just.”
From one point of view, it was certainly not just. The United States had never attacked Japan. It had forced Japan to “open” to outside trade in 1853, but it did so only by threatening violence, not by actually attacking Japan. The US and Japan were not at war at the time Pearl Harbor was attacked. The US was not threatening to attack Japan militarily. All of this would seem to indicate that the attack on Pearl Harbor was not just.
However, you can also argue that the attack was just. You could say it was just because Japan was only acting in ways that the US and European countries had acted in the past. Japan wanted to take an empire just as the US and other European countries had. If, for example, the US could take the Philippines from Spain in 1898, why couldn’t Japan attack the US so that Japan could take an empire in Asia? You could also argue that the US was threatening Japan’s well-being in important ways. You could say that the US embargo on scrap metal and oil was a threat to Japan’s economy and its ability to maintain a strong empire. You could say that Japan needed to expand into Asia to get iron and oil to replace what the US would not sell. From this perspective, the attack on Pearl Harbor was justified because the US threatened Japan’s national interests and because an attack on the US was no worse than things that the US and various European nations had done in the past.
My own view, possibly colored by the fact that I am an American, is that it was unjust for Japan to attack Pearl Harbor. I think they clearly had cause to be upset with the US, but I think that things could have been settled peacefully. Even so, I do not think that Japan’s actions were all that bad in the context of the time in which they were carried out.
The attack on Pearl Harbor was a surprise attack on the US naval base in Pearl Harbor, Hawaii. Japan's primary reason for attacking the US was to strike at US naval power so Japan could continue its expansion to areas throughout the Pacific, such as the Philippines, Guam, and Midway. In order to throw the US off, the attack on Pearl Harbor was necessary. The US also had cut off valuable oil supply to the island nation, which damaged their war efforts.
You could argue that Japan's attack on Pearl Harbor was unjust because at the time of the attack the US was in the process of peace negotiations with Japan. The attack came without warning on a Sunday morning.