When rum is stored in oak casks (or any other wooden barrel types) it is a clear liquid. Over time, the wood, flavorings (common ones include molasses, brown sugar, caramel), spices, and anything else put inside the barrel ages the clear liquid and turns it brown.
This not only changes the color but the flavor as well.