What is substitute for rum in baking?
The most accurate substitution would simply be rum extract. It is concentrated rum with a huge kick of flavor, and much less alcohol. A little goes a long way.

If you're going to stick with a strong liquor my first choice would be a bourbon, it's a similarly "sweet" liquor that tastes good in baking. Another good option would be cachaça.

If you're avoiding liquor, then you may be able to use vanilla extract. Non-alcoholic varieties are available. According to Ochef you can also use molasses thinned with pineapple juice.

The rum is used simply for flavor.