Granulated white sugar is essentially pure sucrose, whether derived from tropical sugar cane, or temperate sugar beets. White sugars vary mostly in the size of their crystals. The degree of processing by the manufacturer may also account for different degrees of whiteness.
Brown sugars are of two basic types: sticky and free-flowing. Both are produced by adding a suitable type of syrup (these days it's usually molasses) to purified or refined sugar. The color and texture of the final product are determined by the ratio of sugar to syrup in the mix, as well the the original colors of the constituent ingredients.