Trust is one of the factors that can improve an empire's willingness to become an ally, as it maps 1:1 to increased opinion (which affects offer acceptance). The biggest factors tend to be the relative size/population of your empires and distance from each other. Other factors include whether or not you have common rivals, whether or not you are on good terms with empires they are also on good terms on, and how much your trade deals with them have been in their favor.
For alliances and federation invitations, opinion is explicitly called out as something that influences acceptance:
Regarding vassals/protectorates, the effect is indirect - trust affects opinion, and opinion is a factor in the empire's attitude toward you. Attitude is part of the factors that affect acceptance of vassalization or protectorate status: