You can check out this excellent answer by @Eugene Manuilov. In your case the relevant admin page action is:
load-appearance_page_customstyle
and the url to the custom stylesheet you want to edit:
get_admin_url().'theme-editor.php?file=custom-stylesheet.css&theme=". get_stylesheet()."&scrollto=0';
Then your code example would be:
add_action('admin_menu', 'add_appearance_menu');
function add_appearance_menu() {
add_submenu_page( 'themes.php', 'Custom Stylesheet', 'customstyle', 'manage_options', 'customstyle', '__return_null');
}
add_action( 'load-appearance_page_customstyle', 'custom_redirect' );
function custom_redirect() {
if ( 'customstyle' === filter_input( INPUT_GET, 'page' ) ) {
$file2edit = "custom-stylesheet.css"; // change this to your needs
$location = get_admin_url().'theme-editor.php?file=".$file2edit."&theme=". get_stylesheet()."&scrollto=0';
wp_redirect( $location, 301);
exit();
}
}
When you click the submenu link
http://example.com/wp-admin/themes.php?page=customstyle
the hook load-appearance_page_customstyle
from
do_action('load-' . $page_hook);
in /wp-admin/admin.php
is activated with the redirect defined above.