This thesis addresses the availability and environmentally optimal use of bioenergy. A life cycle perspective is adopted to consider the supply, the technical conversion, and the final use of bioenergy as well as its use for the substitution of fossil energy. In order to determine the sustainable energetic biomass potential in Switzerland, which is the geographic focus of this thesis, a bioenergy potential assessment is conducted using a sustainability constraints approach. Life cycle assessment (LCA) is performed to analyse the suitability of the conversion of wood to synthetic natural gas (SNG). However, individual technology LCAs are not sufficient to provide answers to the question of "how energetically available biomass resources can be used optimally for bioenergy from an environmental perspective". Instead, more comprehensive trans-sectoral assessments are required including all relevant bioenergy technologies and end-uses, as well as fossil energy technologies that can be substituted. To enable such analyses, an LCA-based system optimization (LCA-SO) framework is developed and applied to the Swiss and European cases. Finally, also spatial aspects need to be considered to determine optimal plant sizes. Therefore, a spatially explicit bioenergy value chain model was developed for the case of SNG plants in Switzerland. One of the main findings of this thesis is that 82 PJ of biomass is available in Switzerland, which corresponds to approximately 7% of its primary energy demand. Half of this potential has yet to be realized. By 2035, when optimally used in the business as usual scenario defined by the Swiss Energy Perspectives, biomass could mitigate about 5 megatons of CO2, which would be equal to 13% of Switzerland's total emissions. Simultaneously, the demand of fossil energy for heat, electricity, and transportation would be reduced by 13%, 3%, and 2%, respectively. In the European Reference Scenario (2030) 9%, 13%, and 1%, respectively, of fossil heat, electricity, and transportation could be replaced and 600 Mt of CO2, equal to about 15% of the EU's total emissions, could be avoided. To achieve these goals, woody biomass should be used mainly for heating and combined heat and power (CHP) generation. The production of SNG from wood to substitute fossil energy has been found environmentally beneficial from the GHG, Ecological Scarcity, and Eco-indicator 99 perspectives. However, the production of transportation fuel from woody biomass is, at the current technological development state, associated with important efficiency losses and is therefore not considered an optimal solution. For non-woody biomass (by which we refer to agricultural residues, manure, bio- and food industry wastes, and sewage sludge) the optimal use is to a large degree determined by the substitution of fossil energy and varies according to the environmental indicator applied. For all biomass, it is vital that a high substitution efficiency is achieved, which implies an efficient conversion of biomass and the choice of optimal substitutions. Finally, the spatially explicit bioenergy modelling conducted in this work indicates that smaller bioenergy plant sizes are slightly preferable in terms of overall environmental benefits, mainly due to reduced transportation distances. However, further analyses would be required to generalise this finding.