When should I require a user to re-login to their account?

I am building a service for developers and I am wondering when I should "expire" a session. I obviously don't want my users to have to login every time they reload the page but I wouldn't want them to have to only login once and have complete access to their account forever either.

I have decided on "every 24h" and I wanted to see what the community has to say.