That's a bit of a 'how long is a piece of string' question. First off depends on how bright you need it.
If you're in a city with lots of street lights you only need lights to stay legal, and some little supermarket flashing things may well do the trick, last years, and cheaper to replace than buy batteries for.
At the other extreme: if on the other-hand you're someone who goes cross country on the commute in the pitch black and find they sometimes 'overtake' their lights you want them as bright as possible, robust, and using rechargeable batteries otherwise you're buying, and carrying large blocks of batteries everyday..
Then with rechargeables you get into the how many hours maximum (remember to factor in getting a flat and fixing it) do you need to run the lights, at what power level, how absolutely cold does it get, are you liable to drop the bike, and how much do you want to pay. All the while do remember that the manufacturers often have an approach to battery lifetime, light efficiency, and power usage that can outdo even the best fiction writers.