Basically, bail is set (or not) by examining the ties the accused has to the community, their economic circumstances and the nature of the crime.
So, consider the following examples:
A -- 30 year resident, owns home, multiple family members, middle class back ground, some kind of accidental death (i.e. manslaughter) -- low/no bail;
B -- Travelling salesmen, knows no one in the community, no money, Murder II -- reasonably high bail because of flight risk
C -- World travelling billionaire with known ties to non-extradition treaty country -- super high bail, maybe remanded until trial (particularly if extremely henious, violent Murder I)