By default, the “Remember Me” checkbox makes you get remembered for 14 days. This is filterable though.
This code will change that value:
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
function keep_me_logged_in_for_1_year( $expirein ) {
return 31556926; // 1 year in seconds
}