In the most general sense, a Sugar Glider is a marsupial (related to kangaroos), while a Flying Squirrel is a cousin of the more common Grey Squirrel. While both have flaps of skin extending from wrist to ankle, they are not genetically related, and come from entirely different parts of the world.
As different species, they have very different diets, the squirrel subsiding on a typical diet of nuts and grain, while the glider eats fruits, vegetables, insects, grain, and other things.
But don't let their names fool you. A "flying" squirrel glides from perch to perch just the same as a sugar glider. Neither can actually "fly".
In terms of pets, they can both make excellent companion pets, but both require extraordinary amounts of work and time to raise/bond. As neither animal is naturally domesticated, an owner must obtain the pet at a very young age (do your research to find the proper age to ween), and must spend many hours per day handling and caring for the pet. Given that both animals live upwards of 10 years, this is not a minor commitment, and must be taken seriously, as once the animal is bonded to a human companion it can not be transferred to a new home.
Squirrels will cost between $150 and $500, depending on where you get them, and Gliders will range from $200-$1700 based on the coloring. Both animals also carry restrictions in some states/areas, so make sure to check with both state and city offices before adopting, or you may have it taken away. It is also important to note that both animals will become lonely if not properly cared for, and getting a 2nd one may be necessary as a friend. Typically, Gliders will need more social attention than a Flier. Be SURE you research your pet extensively before purchasing.