The human body can make use of refined sugar more efficiently than fruit sugar, therefore it provides more energy per unit and is more likely to cause weight gain (in theory). This answer is based on several assumptions, outlined below.
There are many different types of sugar. There are single sugar molecules (monosaccharides), such as glucose, fructose ("fruit sugar") and galactose. There are sugars composed of two or more single sugar molecules bonded together, such as sucrose (glucose+fructose), or lactose (glucose+galactose). Sucrose is basically table sugar, that you might put in your coffee.
"Refined sugar" normally refers to sucrose or to high-fructose corn syrup (HFCS), which is processed sugar composed of about half fructose, half glucose, plus some other stuff (the composition varies, depending on desired sweetness etc). The sugar found in most processed foods, soda and candy is mostly sucrose or HFCS (depending on what country you're in). Some research has suggested that HFCS can prompt greater weight gain than a similar amount of sucrose, for reasons not really understood well.
The sugar found in fruit is sometimes (depending on the fruit) much higher in fructose than glucose; for example, the sugar composition of apples juices in this study was 9.30-32.2 g/l glucose, 66.1-96.0 g/l fructose, 8.5-55.10 g/l sucrose.
Hugely simplified: the single sugar molecules are one of the main energy sources in our bodies (they gets oxidised into carbon dioxide and water, yielding energy). Pretty much all the other kinds of carbohydrates (such as more-complex sugars and starches) get broken down into simple sugars before being used in the body.
The answer stated above assumes that "sugar in fruit juice" is a greater percentage fructose than glucose, and that "refined sugar" is HFCS or sucrose. Glucose can be metabolized and used in any of the body's cells, whereas fructose has to undergo an intermediate metabolic pathway that only happens in the liver (where the enzymes required are produced). Thus, the metabolic pathway for the body to consume and use fructose is more complex and "expensive" than to use glucose. In effect, the body gets less bang for its buck from fructose than from a similar amount of glucose.
In conclusion, the body can make more efficient use of a given amount of glucose than fructose, therefore it is more likely to result in weight gain (in theory, and for sustained consumption over time). In practice, any difference in weight gain from fruit juice compared to (for example) soda is more likely due to differences in total sugar concentration for a given volume.
Note that excess fructose consumption can also produce its own negative health impacts, such as diarrhea.