No real set operation time period for batteries. Everyones experience is different. But for normal wear and longivity, usually 5 years or so and it's probably time to be looking for a new battery. Most of us are going with the Big Crank battery for about $99 shipped. That will save you around $80 compared to what HD wants for essentially the same battery. The Crank is a proven performer and in most cases outlasts the stock HD battery.
My 09 FLHP is still running on the original battery at 43k miles. It gets ridden 250x/year and sits on a tender in the garage when not in use. I keep thinking it is time however it still cranks quickly...
They can at times conk out on you without warning.
But many times, there will be a warning.
That's what I look out for. That is when I replace.
My factory battery acted up at 4 years, I replaced it with a Duracell from Batteries Plus.
Mine just quit after 8 years. OEM since 2008, battery tendered. Luckily, I was storing it for winter and was in my driveway at the time it happened! I was going to change it anyway this spring.
I replace mine every 4 years whether it needs it or not. I've found that fully charging the battery before the first crank can greatly increase the life of it.
Battery replacement on my 14 TK appears to be a hassle, would hate to do on the road. For this reason I plan on replacing next winter, when the bike is just over 3 years. Cheap insurance.