Different species are different, but very mild water stress and lack of surface water cause most plants to dig deeper and wider in search of more. However, too much water stress will weaken your plant and slow root growth because it just can't spare enough energy and water for that right now. Letting plants dry out (but not all the way!) and then giving them a long, deep watering is the best way to encourage root growth in most plants.
Keep an eye on the actual water requirements of your plants. Some types don't like deep watering. Some hate to get their roots dry. So check before applying this rule universally.
If you're in a position where you can water them from underneath rather than let water sit on top of the soil, this is usually the most efficient way to do it. This is especially true in Australia because we have weirdly sandy soil that just does not like to absorb water; even if you use potting mix, water-repellent sand dust will settle on top of it over time. You can bottom water pots this way, use wicking raised beds, or design your gardens with ditches and slopes to catch water and disperse it into the lower parts of the higher ground around it.
Some plants such as tomatoes have a neat trick where if you de-leaf and bury part of the stem, they'll go "guess we're doin' roots now" and grow roots from the buried stem. Many growers of such plants, including me, raise them in pots until they're reasonably large and then strip the leaves off the bottom half or so and bury them deep, increasing the depth of the root system. (You can do the same trick but bury them sideways in a long ditch instead of in a deep hole if you want to increase the breadth of the root system instead). NOT ALL PLANTS CAN DO THIS. Many plants, including most fruit trees, will rot if you bury part of their trunk. Check before burying.
Obviously, anything in the ground is going to have a more resilient root system than anything in a pot, once it's established (assuming similar soil quality). The roots have further to stretch out, more places to find water, and the earth is of a more consistent temperature. One problem I'm having with my potted plants is the pots themselves heating up in the sun, heating the tiny amount of soil inside and the roots within; some plants like warm-ish roots (like tomatoes) but there are limits. You can cool pots with shade and by wetting them and soforth but nothing is going to be as efficient as tons and tons of earth around the root system.
In my personal experience, raised garden beds (open to the soil beneath for most plants, closed to the soil below for rooty invasives like blackberry or mint) are the best compromise between planting in the ground and the convenience of pots when it comes to most plants. They have the space for good root systems and are easy to deep water without all the water running away all over your yard. I'm talking deep raised garden beds, waist high or so, not those 20cm "raised garden beds" that are little more than decorative bed edging.
Another way to retain water in soil is with dead wood. I fill my raised beds about 3/4 with pruned sticks and branches and then put soil and compost on top. Then I add more soil and compost a couple of times per year as the wood breaks down and settles. I live in a high rainfall area for 9 months of the year, so the wood soaks up all that rain and provides moisture from deep below as the surface dries out through the start of summer, which encourages deep root growth (see point 1). This does come with some risks as the presence of dead wet wood increases the chance of root fungal infections, but we all make tradeoffs.
You can combat the risk of root infections with good drainage, mostly, but when the whole goal is for your wood to hold onto water for you as if breaks down, there's not much that you can do about the water (and fungus) inside the wood. Good drainage is still necessary for the rest of the water though.
The really big factor in deep, resilient root systems is time. Choose perennials over annuals where viable. You're going to have to baby the roots of new annuals every year; get perennials through their first couple of years and you can ignore them for the rest of their life except for a couple of good deep waterings in the heart of summer (climate dependent).
Weeds are not the enemy. I thoroughly weed my gardens about once per season, and additionally if the weeds look like they're going to choke or shade anything particularly vulnerable, and otherwise let them be. Weeds shade the soil and your productive plants in severe weather (both heatwaves and frost), improve nutrient cycling and soil, provide something for bugs to snack on that isn't the plants you care about, and most critically here, improve water movement and drainage through soil. You're going to be able to water an area deeper and more efficiently if it's networked with living roots than if it's dead except for the lone plant you care about. (You might want to spot weed particularly invasive or poisonous weeds though, especially if you have children frequenting your garden. I have belladonna and English ivy in my yard and pull both whenever I see them.)