If I need a student visa/residence permit, when should I start applying for it?

We recommend that you apply as soon as your receive a confirmation of acceptance to the summer school. You could apply on-line at the Swedish Migration Board or through the Swedish Embassy or Consulate close to your home city.

Read more here.