I've just finished reading Wool, which is about just such a thing, and it's been very interesting and a lot of food for thought.
The first large problem that is obvious to think about living underground is that you have issues with food production. We do have the technology to grow food in hydroponic style areas using lights at the moment, so that's fine. However, this is remarkably energy intensive.
In living on the surface, the Sun is always available as an energy source, so there's never a problem about growing food. If things go badly, you just plant seeds in the ground and watch them grow. Underground, however, there's a steady energy requirement to power any lamps used, so energy generation is extremely important and becomes a part of the food chain. If the energy production system breaks down, the first thing that will happen is starvation.
But that's not just all. So, is there any access to the surface? If not, then you're also dealing with closed ecologies, which there's been some research in with regards to space travel but no one really understands and so would be experimental.
Ecologies are immensely interlinked things and there's no telling what happens when you take a small bunch of species and completely isolate it from the rest of the world. So, for example, if you have insect pollinated crops, but the insects die out underground, again, starvation and the collapse of society follows. This is something that's easy enough to fix if you can just go out and get more, but without it, planning becomes harder.
Have people gone underground because something has happened may also imply the air is unbreathable? If so, you're also using the ecology to regulate your oxygen supplies and your atmosphere. Again, this gets tricky and probably you also want a mechanical way in addition to recycle oxygen, as a back up and as a regulation system (but this makes you more reliant on energy). There may be a process you can use to strip enough stuff from even a tainted atmosphere, if that's available.
OK, now let's deal with water. You also have to recycle your water system and have a closed cycle for water. Whatever people pee and whatever they're pooping, you need to grab, process and reuse.
The system won't be perfect and that's OK, as the deeper your dwelling goes, the lower down you'll go through the water table and you'll have access to water to top yourself up, but you'll also have to pump it out in order to prevent flooding. This is important and unstable. So, also, if the power goes down, anyone deeper than the water table drowns.
In terms of power generation, this gets tricky. People may have access to the surface and might be able to use mirrors to reflect some sunlight down, which might help things, and solar power can still be used if the surface is unlivable, but still accessible, since living underground makes the surface useful.
But assuming, again, an unusable surface, you need a source of energy. In Wool, the underground shelters are on top of coal mines, which is one way to keep things ticking along. However, there's also geothermal. Go down deep enough and it gets very hot. If you can cycle water through that, it's instant energy. It's probably the only truly sustainable energy you can have underground, and probably vastly cheaper if you've already started underground. This is doable with current technology.
Power generation is also important that you have to have redundancy. No mechanical system runs forever and so, any design needs to have multiple sources of power. The more the better.
OK, so we've gotten basic human needs sorted, we can also look at some of the human parts of this.
Any underground civilisation is likely to start small and to be precariously balanced between survival and extinction. There's lots that can go wrong. Any such society founded on that kind of principle would automatically become authoritarian to start off with and place a high premium on law and order.
This would survive by the simple expedient that people would realise that breakdowns in law and order could destroy vital infrastructure. It's not the world's end if some destroys a power plant on the surface. It is the end of the world if someone does that underground. Society would be, therefore, very rigid and focused heavily on survival and with one ruler (be they elected or not).
However, as things develop and the society succeeds and grows (if that happens), liberty may creep in, but it would not be like what we're used to. Liberty would be founded on the absolutist survival of infrastructure with liberty around those bits that are extra. So, for example, there might be a distinction between engineering and engineering to maintain the habitat. Likewise with ecology, you'd have people who grow crops and people who actively maintain the ecology.
It's likely, as time progresses, that the infrastructure and ecology maintenance would move to an independent or quasi-religious institution. Even in wars, people would not want to mess with them, because everyone dies, or that new social orders would arise to enable liberal systems which do not threaten survival (see Kim Stanley Robinson's Mars trilogy for a good discussion of political systems in the era of human-maintained ecology).
Population would have to be rigorously maintained, especially at first. With such a closed ecology, you'd need to brutally maintain a population control mechanic, related to mining expansion of the underground area and the power available. People can not choose the size of their families.
Humans are not made to live underground, so you'd have psychological issues. How would people with claustrophobia cope? How to deal with sunlight-deficiency disorders, lack of vitamin D? This is where it gets a bit scary.
Wool explores this by giving people an option to go outside, even though this is fatal. If you say to go outside, that's it, you're gone. It's one example of coping.
However, rulers may also adopt more socialist tendencies to cope with the problems (e.g. Scandinavia) and religion may become vitally important again as a way to cope.
Additionally, taking into account the tight population controls and the massively authoritarian government, you're looking at armed uprisings every once in a while, as people blow off steam. This conflicts with the infrastructure issue and, well, the easiest way to cope is to have multiple cities separated from each other, so if one goes terminal, nothing bad happens to the others. People might also have some small choice where they want to live, which would help a lot and limited conflict between different underground cities might help blow off steam and prevent stagnation without ending the world.