There are numerous problems in the world that need to be dealt with in order to achieve sustainable development. The energy system has significant negative impacts on many of these problems, and there is a need for a transition towards more sustainable energy. Sweden has already started this transition and is using large amounts of renewable energy. However, within the transport sector and the manufacturing sector in particular, large amounts of fossil fuels are still used. Biogas is one alternative that can help solve several sustainability problems and that could be part of a future more sustainable energy system. However, it is not certain what biogas is most suitable to be used for. The aim of this thesis is to investigate how biogas should be used in a future more sustainable energy system, by answering three research questions: 1) In what ways can biogas be used in a more sustainable energy system? 2) How can we assess whether biogas is suitable in a specific context? and 3) What determines whether it is easy or difficult for a user to start using biogas? These questions are explored in a Swedish context using four appended articles, which are based on two collaborative projects using a combination of workshops, literature reviews and interviews. Biogas can be used for heat, electricity or fuel in the manufacturing or transport sector. In Sweden, heat and electricity are mainly of interest for smaller production scales, while production on larger scales will likely be dominated by upgrading mostly to CBG but also to LBG. CBG can be used for less energy-intensive purposes, such as cars or buses, while the growing interest in LBG in Sweden may open up new market segments for biogas which are more energy-intensive, such as heavy trucks or shipping, or in geographical locations that are further away from the site of production. Several sustainability assessment methods exist that can be used to evaluate whether biogas is suitable in a specific context, such as multi-criteria assessments or scenario analyses. These methods can include a number of different aspects that are relevant to biogas use, such as GHG emissions, safety issues, and the vitality of the surrounding region. In order to introduce biogas, six main factors were identified that can make this easier or more difficult: technical maturity, tank volume, distance between the producer and the user, scale of energy use, policies and costs, and strategies of individual organizations. Overall, the rise in LBG production creates new opportunities for biogas use in both geographical and usage areas that did not previously use biogas. There is no simple answer to what biogas should be used for in the futurerather, this depends on the circumstances. It is also possible that the usage areas that are most suitable now for biogas might not be the most suitable areas in the future, depending on developments within, for example, the electricity system and hydrogen. However, CBG and LBG are likely to dominate biogas production in Sweden until then.