There is no definitive answer.
Even when you have room to expand, don't need war, and it will be cheaper and easier than war, there are times you will want to war anyway because the AI has what you want (great land, key resources).
This isn't always a strategic resource. Suppose you are Industrious and have an AI to the East blocked off from land you are free to settle to your west. AI's nearest 2 cities, one his capital have gold in one and gems in the other, neither of which resource is in any of your potential land. It will probably be worthwhile to take those cities as soon as you are able. Cheap forges plus gold plus gems is an easy 4 happy, and you get more production as a bonus.
Same case geographically, you have nice land for first couple cities, ok land for rest. You have scouted AI and land around him, and not only is capital and second city great land, but there is a vast expanse of excellent land beyond. Better to cripple this AI sooner than later so it doesn't expand to all that nice land and become much harder to deal with later.
In both cases, it may be cheaper and easier to use settlers, and even better for your empire for the short term, but war is the better choice.