The idea is to remove oxygen and moisture and get a good seal on the jar. The vacuum pulls the lid against the jar, forcing the gasket more tightly against the rim. Note that the seal won't be as good as with actual canning, though, where the gasket is also softened by heat, so it molds better to the rim.
That may or may not actually help you out, though: not all food suffers terribly from oxygen and moisture exposure, and not all food safety issues are mitigated simply by vacuum seals.
Notably, vacuum sealing is not canning. (I've heard of people using vacuum sealers in that context, and that may be part of why your sealer came with that attachment, but it's not generally a safe usage.) What really matters here is what the food is, not what the storage vessel is. If it's something that'd benefit from vacuum storage in a bag, it'll also benefit in a jar. Everything still has to be stored the same way it would be without the vacuum seal.
The National Center for Home Food Preservation has a great article: Should I Vacuum Package Food at Home? The key point:
These machines may extend the storage time of refrigerated foods, dried foods and frozen foods. However, vacuum packaging is not a substitution for the heat processing of home canned foods.
Vacuum packaging is also not a substitution for the refrigerator or freezer storage of foods that would otherwise require it. In fact, vacuum packaging can add to the concerns associated with storing of these perishable foods (which are foods not stable at room temperature and requiring cold storage).
By far the biggest food safety concern here is botulism, because you're creating an anaerobic environment where C. botulinum will happily grow. Anything with any possibility of bacterial growth will need to be refrigerated or frozen to stay safe.
Probably the most common case where this is useful and clearly safe is non-perishable dry goods. That article gives nuts and crackers as examples. Removing the oxygen makes the oil in nuts go rancid more slowly, and removing the water vapor makes crackers go stale more slowly. Anything else with substantial oil content or crisp cooked starch (like chips) would benefit similarly. Mason jars might be a slightly better choice for some of these things since a flexible bag would be more prone to crushing them, but otherwise, the jar isn't the important part, the vacuum seal is.