Hominids lost any tails we had before we evolved away from the rest of the great apes, which is related to why you should never call an ape a monkey. What could lead to a hominid species re-evolving a tail?
Starting from our current evolutionary state the first step is a sudden mutation to have some form of tail again. This one can be very small and doesn't need to have any real effect.
Afterwards people start to like it. It's unusual and therefore normally an evolutionary disadvantage, but if that individual manages to lead a good life apparently the rest of his genes is very good. Look at peacocks for example.
Tails are starting to be normal
Quite some time afterwards everyone has a tail and people start preferring longer tails that can actually do something, because just having a tail is not good enough anymore.
Suddenly hominids have a prehensile tail.
(Note: some steps may be faster if you start genetically engineering humans to exhibit this trait and selecting them for procreation.)
If you're talking about "natural" evolution,
We has tails for awhile there for (in short) mucking about in trees.
the really obvious future need is
tails make it much easier in zero gravity.
This one is so obvious, unfortunately it's in a number of scifi books already!
(But the tails are usually added by simple genetic work. If you propose naturally-evolving tails, it would simply take, say, 100 million years, like any evolution.)
If you want to exclude space travel. The simple answer is "if for some reason we again had to spend a lot of time in trees." Say you asked "what would make humans evolve gills?" The obvious and only answer would be "if for some reason we again had to spend a lot of time in water."
The purpose of tails (on primates) is mucking about in trees.
(The purpose of tails on incredibly fast quadrupeds - cheetahs. etc - is an extremely sophisticated balance system, allowing for high speed running. But we're primates. Primate tails == trees.)
Considering we haven't completely lost the genes of a tail hypothetically we could without genetic engineering, exampled by fetuses having tails at certain points of development and those who never end up loosing then after development.
As answered similarly by another person, we would first have to have a person born with the genetic mutation that allows them to keep their tail, then again as the previous person said we would have to form an attraction to tails leading more and more people to have them. This process would be much quicker of we had more than just 1 person with the mutation who sparked this.
Over time our population of tailed people would grow and then once again as the other person said it would most likely become a way of sexual attraction selecting those with bigger and more useful tails. But another way they could get bigger, more useful tails is by starting to use them for tasks and naturally evolving them bigger as a means to make things easier, although this process would most likely take a more substantial about of time.
Sooner or later in a few thousand years we would have fully developed tails, most likely prehensile like our ancestors.
But, all of this can easily be sped up with the use of genetic engineering. Once a large population has developed tails it will be a couple hundred years in the future and our genetic engineering will most likely be more than we could even imagine now so it could easily be something that's they just give to everyone because of its use.