Vaccines for bacteria are... problematic at best, because they have relatively low effectiveness at preventing infection. The best way to eliminate TB is to get clean water everywhere. Stopping TB through vaccination is like stopping pedestrian deaths with inflatable pedestrian balls. Yeah, it might reduce the mortality, but the real problem is unsafe pedestrian crossings / unsafe drinking water.
Actually, I was remembering wrong there. Although TB can spread in other ways, it is primarily an airborne pathogen. So the biggest way to reduce the spread would be to add central heat and air with fresh air mixing and reduce the number of people sharing air for long periods of time. The second best way is contact tracing and prophylactic treatment.
But to add further to the comment about vaccine effectiveness, bacterial vaccines can be at least somewhat effective at preventing disease, e.g. the bacterial meningitis vaccine has something like 65% to 85% effectiveness, depending on age group and other factors, which is way better than nothing.
The TB vaccine only reduces infection risk by 20%. And when you're exposed frequently, that's barely even useful. The reason for this is that it hides from the immune system, which, as a result, takes a long time to start reacting to the bacteria, allowing it time to multiply for a while before you get a reaction. In mouse models, the reaction takes a whopping two weeks.
TB actually infects macrophages (primitive immune cells), and manages to literally hide inside them by adapting its exterior to maintain a neutral pH and by synthesizing enzymes that prevent the macrophages from maturing and that slow down apoptosis, which otherwise would release the bacteria, which would trigger T-cell activation. It's unclear whether there is a realistic way to prevent this delay.
It also plays tricks like triggering certain antigen-specific CD4+ T cells to the point of functional exhaustion while reducing antigens that would trigger other CD4+ cells so that they don't get detected. It somehow brings mesenchymal stem cells (blood vessel/lymphatic/connective tissue precursors) to the infection site, which further inhibit stem cells.
Presumably any better vaccine would have to either convince CD8+ T cells to react even without macrophages recognizing that something is wrong (perhaps by increasing the number of antigens that are included so that they are more likely to recognizing an antigen on the bacterium itself directly, early in the infection process, assuming this is even possible), convince CD4+ T cells to trigger macrophages in spite of signals to not do so, or overcome one of the design limits of the immune system (preventing T-cell exhaustion, increasing random macrophage apoptosis without an infection, etc.), some of which would likely require changing the person's DNA.
So fast diagnosis (universal health care and widespread rapid TB testing), contact tracing, etc. are critical to bringing it under control, and other prevention, such as not having large numbers of people in constant contact in areas with limited air circulation can also help. Meanwhile, vaccines, although not entirely infeasible, are likely to be more of a long shot.