I bought a couple of azaleas at Home Depot at the end of the season last year. They're basically just a couple of sticks with flowers on top. How and when should I prune to encourage wider growth?
I would leave them be. In a normal growing season, you're going to get a couple of growth spurts so foliage will be increasing.
Patience is the key. In 2-3 years, that azalea is going to fill out just nicely. One can't rush these things in my opinion.
Some rhododendrons/azaleas are naturally leggy and others branch into bushy forms...there's no need to let nature takes its course with a sparse shrub if you don't wish to.
Easiest with younger plants - simply pinch out the leaf buds as they begin to open for approximately the first three years after planting. There is a plant hormone in the leaf buds which inhibits development of dormant buds along the stem.
Or, you could take a harsher approach and cut those longer stems back about half way when the flowers begin to fade. If you didn't mind losing the color in your bed, you could do it now and use those stems indoors in a vase.
Morz8 is entirely correct. I am concerned that you are able to tell the difference between the leaf buds and the flower buds. If you wait long enough, the flower buds will be much bigger than the leaf buds. Then it is safe to remove the leaf buds.
I have a friend whose rhododendron and azalea garden has all plants about 3' tall, and it was a mature garden. His trick is not pruning, but just walking through the garden and with his fingers pinching or breaking off leaf buds that were on the top of the plant. It works great. You can stand anywhere in his garden and see all his plants and he has a very large flower garden.