As with many things in winemaking, no solid rules, but generally I back sweeten after I'm sure fermentation is well over and after I've racked a few times. Then I wait and see if anything settles out after that before bottling. Always remember to use a combination of Sorbate and potassium K-meta. Depending on the type of wine I'm making I like to play with the ingredients for backsweetening, using a combination of fruit juices and/or sugar. For a more exacted calculation on how sweet you like it, find a similar style wine and sample it or do some small bench trials to play with. I've also been playing more with suspending fermentation to reach my desired residual sweetness to see how that affects the flavor profile by leaving some of the natural sugar from the juice, instead of adding sugars from other sources.
I normally use Residual Sugar level as calculated as 10g/L for figuring out how sweet I want my wine, but I know I have seen others who base their calculations more on Specific Gravity, either way it's just a very good estimate and ultimately it's a personal preference and an balancing act between sweetness, acidity, and alcohol level. For myself depending on the style of wine, normally for wine's I know I'm drinking in the summer and I'll want like a semi sweet wine I'll go with 4% Residual Sugar (so that 4% means 40g/L of wine, so assuming a 5 gal batch, thats about 19 Liters so 40 x 19L equals 760grams of sugars that need to be added to get to that level. I normally use some juices, frozen or bottled and calculate how many total grams of sugar I'm adding. A quick note is that 1lb of sugar is about 454 grams of sugar, or about 2.3% Residual Sugar for a 5 Gal batch.