Sundsvall has its own airport, Sundsvall-Timrå (SDL), but there are only a few flights to this airport from Stockholm. So the easiest way to get to Sundsvall is to book a flight to Stockholm-Arlanda (ARN) and to take one of the direct trains from there to Sundsvall. Arlanda Central train station is below the airport, the entrance is in the Sky City between Terminal 4 and 5.
You can book trains from Arlanda C to Sundsvall C right here: www.sj.se
There are also night trains vom Berlin and Hamburg to Stockholm which might be interesting for you: www.snalltaget.se