Squirrels are cute, but they can be a real nuisance in the garden. Flower pots or freshly tilled garden beds are an open invitation for squirrels to bury their cache of nuts. Squirrels also dig and eat the bulbs and seeds of many flowers. At a minimum, try to position your flower baskets and pots in areas inaccessible to squirrels. Otherwise you'll have to try to trick or distract these pesky rodents.
Lay a section of 1/2-inch mesh hardware cloth or chicken wire fencing inside the basket when you plant the seeds or bulbs, then add soil. Add another layer of cloth or wire on the top layer and cover with mulch. The plants will grow around the gaps in the wire, but squirrels won't be able to dig through.
Use a spray repellent that tastes or smells bad to squirrels. Hot pepper sprays or other animal repellents such as "Liquid Fence" can be purchased from any garden center. You will need to spray after every rain shower. Mothballs in flower baskets also repel squirrels, although you will need to replace the mothballs every few days as they disintegrate. These methods may not be appropriate if you are growing flowers for their fragrance or if you are growing edible plants in your baskets.
Hang your flower baskets from a shepherd's hook and install a squirrel baffle, a disk or tube that attaches to the pole of the shepherd's hook and prevents the squirrel from climbing up the pole. Squirrel baffles are available at hardware or bird supply stores. Squirrels are good jumpers, and your shepherd's hook should hold the flower basket at least 4 feet off the ground. Place your shepherd's hook out in the open, so that squirrels cannot leap into the flower basket from nearby trees or fences.
Distract squirrels by providing feed for them in another part of the yard. Squirrels are especially fond of corncobs, peanuts and sunflower seeds, although they will eat almost any kind of birdseed.