Bikes in use result in what could be called a net gain in the energy budget, since it takes fewer calories to ride somewhere than to walk there (and both require about the same extent of road surface).
However, like all metal or plastic objects, bikes have a certain embedded energy, which is the energy it takes to mine the ore or drill for the oil, refine it and transport it to factories, form it into basic shapes such as tubes, then build and assemble it into a bike and transport it to a salesroom.
In the case of cars, the embedded energy is equal to half the fuel energy the car will incur in a typical ten year lifespan.
In the case of bikes, the embedded energy is all it will incur, besides more embedded energy in expendables such as tires and chains.
So, in the bigger picture, it's better to use a bike as much as possible until it wears completely out, and it's better--better for the earth and our cultures upon it--to buy used bikes and ride them instead of letting them sit in some garage while a younger, prettier bike gets all the use.
In the sustainability world, the mantra is "reduce, re-use, recycle," in that order. It takes energy to recycle, it saves energy to re- use, manufactured objects.
And bikes are so efficient as transportation that it should almost be a crime to leave one unridden! (Before you light up the flamethrowers, please note that I am speaking poetically here and not proposing any draconian ride-or-die laws. Though given the effects of obesity on Americans, one could say that such a law already exists as a natural law....)
Folks will still buy new bikes when they need to. But the truth is that you don't need to very often.
The best argument for a custom bike is that you are more likely to ride it farther and ride it longer if it fits your body and your riding style. But if a used bike fits you well, and you ride it happily, frequently, and far, you are being kinder to the earth, and thus to all of us, than if you buy a new one, even a custom.