Oily surfaces are related to roast level
I don't think oily beans are related to roasting time as you say in your question. Instead, oily beans are characteristic of a darker roast. Roasting levels are primarily related to the internal temperature of the beans, the higher the internal temperature of the bean, the darker the roast.
Wikipedia has an overview of different roast levels. Three of the roast levels in their overview mention an oils on the surface of the beans (emphasis mine):
225 °C (437 °F), Full City Roast
Medium-dark brown with dry to tiny droplets or faint patches of oil, roast character is prominent. At the beginning of second crack, body is fully developed.
230 °C (446 °F), Vienna Roast
Moderate dark brown with light surface oil, more bittersweet, caramel flavor, acidity muted. In the middle of second crack. Any origin characteristics have become eclipsed by roast at this level
240 °C (464 °F), French Roast
Dark brown, shiny with oil, deep caramel undertones, acidity diminished. At the end of second crack. Roast character is dominant, little of the inherent aroma or flavors of the coffee remain.
Wikipedia doesn't list the oily surface explicitly for the darkest roast: the Italian roast. Instead, it just describes it as "nearly black and shiny". Nevertheless, the Italian roast has a very oily surface, as described by this article form Seattle Coffee Gear which compares the French and the Italian roast levels:
However, we know that there are die-hard devotees of dark roasted coffee and we were recently asked what the difference was between French Roast and Italian Roast.
They're both roasted quite darkly, so that they have an oily sheen to them after the roasting process is complete. With a French Roast, the temperature of the roast is high enough that these oils are brought to the surface and will impart a roasted flavor to the produced coffee or espresso. Aromas can vary from berry to citrus. Italian Roast is much darker and oilier than a French Roast and often preferred in Italy.
Oily vs. non-oily beans
I don't think it makes sense to say that one is better than the other. In comparing the two, I think it's better look at light vs. dark roasts because there are more factors at play. As a general rule I would say that the darker the roast, the more prominent the roast profile becomes over the origin characteristics.
Another note about oily beans is that they can leave more residue in your grinder (and other parts of the machine where the beans pass through).