Assuming that you want to end up with light onions and not caramelized onions:
You always want the onions to be cooked through enough to have lost the sharp flavor and hard texture, just as Michael mentioned.
In some recipes, you will prepare them to the desired stage, then finish the recipe with the other ingredients. This is frequently done in stir-frys.
But sometimes, you know that the onions are just the start of a complex recipe, and will continue to be cooked for a long time. This is especially a problem with stews and soups, where letting the onions simmer can render them too soft, somewhat jellyfish-like. Then it is better to fry enough to change the aroma through the dry heat and fat reactions (I don't know which ones they are, but they don't occur when you are boiling an onion in liquid), but stop a bit before it has lost its firmness. Then you continue cooking the soup, and your onions end up firmer than if you had cooked them through at the beginning.
And a pedantic notice: you are probably not sauteeing the onions, and if you are, you should stop doing it.
Sauteeing means to use very high heat and keep the food in constant movement by shaking the pan. The proper way to turn onions translucent is to put an even layer of them above melted butter, and wait for them to get ready, on medium heat. If the layer is thick, wait until the bottom ones are quite close to being done before mixing thoroughly once and then waiting again for the bottom ones. Repeat until all onions in the pan are translucent. They benefit from slow and even heating, while sauteeing is a treatment intended for highly heated surfaces but keeping the core colder.