Star Wars is based on the phenomenally successful Star Wars license currently belonging to Disney. Though roughly based on the events of the first film to be released chronologically - Star Wars IV: A New Hope - the game takes various liberties with the source material.
The game actually pioneered a lot of features that would later appear in Capcom's Mega Man series - the first of which would be released a few weeks after this game. These include various but limited "Force" powers that occasionally help Luke past obstacles or increase his combat prowess, similar to Mega Man's powers acquired from Robot Masters. Certain conventions like the disappearing/reappearing blocks are here as well. The game also shares Mega Man 1's extreme difficulty with regards to the precision required for its jumping puzzles.
This game is not to be confused with the other official Star Wars game for the NES, which also lacked a subtitle. That game was released in 1991 by Beam Software/JVC Digital Studios in all territories whereas this Star Wars was released in 1987 by Namco in Japan only. It was never officially released in English but fan translations exist.
Inconsistencies with Star Wars Canon
The game is known for having things that are inconsistent with the series. For example, Luke Skywalker has blond hair in the cutscenes but in the gameplay he has black hair. Darth Vader also turns into a scorpion.