Only for the Ranger's Attacks
Hunter's Mark is cast on an initial target and provides a bonus on the caster's attacks. Emphasis is mine below:
You choose a creature you can see within range and mystically mark it as your quarry. Until the spell ends, you deal an extra 1d6 damage to the target whenever you hit it with a weapon attack, and you have advantage on any Wisdom (Perception) or Wisdom (Survival) check you make to find it.
Just like the extra damage doesn't apply to your allies, it doesn't apply to your beast either (which is effectively another creature and an ally). It is for your attacks and your attacks only.
I think it's telling that the Revised UA Ranger was updated to more closely match the wording for familiars:
- The companion obeys your commands as best it can. It rolls for initiative like any other creature, but you determine its actions, decisions, attitudes, and so on. If you are incapacitated or absent, your companion acts on its own.
But, leaving that aside, it seems to me that the way these two clauses interact is critical to the interpretation:
If you are incapacitated or absent, your beast companion acts on its own, focusing on protecting you and itself. [...]
I would interpret "on its own" to mean in the way it would naturally act in the wild. For lack of intelligence and manual capability, you don't see too many wild animals slinging wands of fireball around.
In the context of the rules, this would mean playing the animal companion directly from its stat block. However, the general rules in the Monster Manual (pg 10) do say that
When a monster takes its action, it can choose from the options in the Actions section of its stat block or use one of the actions available to all creatures, such as the Dash or Hide action, as described in the Players Handbook.
and since "Use Object" is such an action, an animal acting "on its own" in accordance with the general action rules would be allowed to use an item among other actions available to it.
Some animals are pretty intelligent and do possess opposable thumbs or prehensile tails, etc, so it's conceivable that they could intuit that the long stick its master waves around to turn things into smoldering corpses could be used in defense.
At the end of it all, I don't think it's possible to arrive at an answer that isn't "Ask your DM" because the rules seem to allow the companion access to the full array of actions but don't necessarily allow it to think or act any differently than a wild animal would act.
Best Answer
The players usually control their characters and use of class features, but this is not their character
the PHB says on page 5:
Unless a feature explicitly says something different, the players decide how to use it. But they get to decide what they want their adventurers to do. The companion is a class feature of the Ranger character, but is not the character themselves, so this is a special situation where the creature is not the adventurer, even though it is part of a class feature. So the DM could decide to run them, or let the player run them.
For comparison various spells that summon creatures as part of the character's Spellcasting feature say:
Here, the feature tells you how the creature behaves. The companion feature does not do that.
Some DMs will be happy to let you control the behavior. Other DMs generally reserve the right to control any creature other than the actual player character themselves unless the rules explicitly call out where or when the character can control their actions, so check with your DM how they handle it.