Yes, an urban planter box can get quite hot in direct sunlight, but whether it will actually cook the roots depends on the container material, size, soil volume, moisture, plant type, and local climate. Small, dark metal or plastic boxes in full sun are the most at risk. Their soil can reach temperatures high enough to stress roots, causing wilting even when the soil is moist, yellow leaves, stalled growth, and crispy leaf edges. That said, healthy roots rarely cook in a well-managed planter.
Choose light-colored, thick-walled, or insulated containers. If you already have a dark box, line it with bubble wrap, foam, burlap, or another insulating layer. Use a larger soil volume because it buffers heat swings. Add a layer of mulch, such as straw, coconut coir, or compost, to keep the surface cooler and reduce evaporation. Water deeply and consistently, preferably in the morning, but never let the box sit waterlogged. During heat waves, provide afternoon shade or drape shade cloth over the plants and the sunny side of the box. Group containers so foliage shades the soil, and elevate them slightly for airflow. Avoid placing them against west-facing walls that radiate heat.
If you are worried, check the soil temperature with a kitchen thermometer. If it stays above 90°F (32°C) for long periods, roots may suffer. Move the planter, add shade, or improve insulation. With the right setup, an urban planter box can stay warm and productive without cooking the roots.