Choose partial shade over full sun
Partial shade is the usual advice for a hummingbird feeder. Morning sun with afternoon shade works well, since heat speeds up spoilage of the sugar solution. Warm nectar can grow mold and bacteria, so expect to change it more often when the weather is hot.
Deep, full shade is less ideal. A bright feeder tucked too far back can be hard for passing birds to spot. Filtered light under a tree or a porch roof is a common compromise.
Hang it at least four feet off the ground
Illinois Extension recommends hanging feeders at least four feet off the ground. That height also helps keep cats and snakes out of reach. Some guides suggest a range of four to six feet, but very high feeders are harder to clean and refill and tend to sway.
Squirrels are another problem for low feeders. For ways to deal with them, see squirrels and hummingbird feeders.
Keep it out of the wind
A feeder that swings can spill its contents, and hummingbirds tend to avoid one that sways. Look for a spot beside a wall, under an eave or near a dense shrub that breaks up gusts.
Put a perch nearby
Hummingbirds rest and watch over their feeding area from perches. Illinois Extension suggests placing feeders near trees or shrubs where birds can perch. A branch or wire close by gives them a place to sit between visits.
Think about windows
Window strikes are a serious risk at feeders. The placement rule you will see most often is the rule of 3 or 30: keep a feeder within about 3 feet of a window, or more than 30 feet away. A bird that leaves a feeder close to glass does not have room to build much speed. At 30 feet or more, it has room to steer around the house. Some bird groups say the distances in between are the riskiest.
The rule was written with bird feeders in general in mind. Hummingbird-specific research is thinner, so treat it as a sensible guideline rather than a proven one. Hanging streamers or cords outside the glass, or applying bird-safe window film, can also cut down on strikes. For what to do if a bird does hit the glass, see hummingbird hit window.
Hang more than one feeder
One territorial bird can monopolize a single feeder. Illinois Extension suggests hanging several feeders to attract more hummingbirds and reduce bullying by one aggressive bird. Why one bird defends a feeder is covered in hummingbird guarding feeder.
Make it easy to see and reach
Place the feeder where you can watch it from a window or seat, and where you can reach it without a ladder. Placement and cleaning go together. Guides commonly suggest cleaning weekly in cool weather and every day or two when it is hot.
For the full setup, including the nectar and cleaning routine, see setting up a hummingbird feeder. For when to put feeders up and take them down, see hummingbird feeder season.
Once they find it, they come back
A hummingbird that finds a good feeder often returns to it. How they locate one in the first place is covered in how does a hummingbird find a feeder.