Can officially licensed merchandise be considered canon to a fiction item? I.E. a Lego set for a movie, or action figures that give a name to a nameless character? It's being created with the blessing of the work of fiction's creator's approval, so it would make sense that it would be.
In my opinion, officially licensed merchandise (e.g. games, toys, etc) fall into exactly the same boat as official novelizations of movies. Those books were not written by the original creators of the movie, but they were authorized and approved by them. The same goes, for example, for video games based on movies (like The Matrix Online). If a creator formally approves and authorizes someone to create merchandise based on their work, I think there's an implied assumption that they will have some control over what that looks like.
In all of these cases, again in my opinion, we should follow the general rule of thumb for "secondary" canon:
The information is canon unless is contradicts something else that is more canon.
There are exceptions, obviously, as there always are, and we may need to use our judgement to figure them out. For example:
- In some cases, e.g. Star Wars, the creator(s) of the work have actually gone to the trouble to tell us what is/is not canon and where it ranks. In those cases, obviously, follow their lead.
- In some cases, e.g. the Lego video games, the work is obviously not intended to be set in the same "fictional universe" as the original work, and we shouldn't take anything new or original from that work as canon.
Canon is like Humpty Dumpty's philosophy:
- "When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean — neither more nor less."
I.e., canon is whatever the writer/property-owner says is canon. Well, at least until the next time they retcon it.
To tie this answer more specifically to the question, I would not base canon on the existence or design of a toy. This is my opinion and it varies from that of @KutuluMike . The toy makers and property owners have different goals and constraints. At best, toys are simplified versions of what is canonical in the movie/story/comic/manga/tv-show etc. At worst, they are barely related by name and claim on the toy packaging. Other than granting a license (and for unlicensed rip-offs not even that) some property owners will have little knowledge or control over what the toy company produces. Fans can be more concerned with canonocity than the creators themselves. Other owners will be involved intimately and have veto privilege. There is not a general rule. Plus, even stuff you think is officially licensed may be a knock-off.
One place where the "toys" would be absolutely canonical is trading card games. For example, a card from a Magic the Gathering™ set from Wizards of the Coast is not only canonical, it is part of the thing itself. In sets that have multi-media adaptions (cards, games, tv-shows, movies), such as Pokemon™, the roles are very fuzzy. The property owners probably do their best to maintain a common canonocity, but synchronicity is bound to be an ongoing problem.
Another special instance is long-existing toys which have gone into multi-media. For example, is the Barbie Princess Gem™ doll canonical even if it has never appeared in a Barbie movie or game? Of course. The toys are the thing and the movies are based on the toys. You could legitimately ask the reverse question, Are licensed movies considered canon?. (In which case I would reply, "Canon is like Humpty Dumpty's Philosophy ...".)