There are no big difference, both are possible, If there is, it's too small to be explained. You can use them interchangeably.
"in summer" - abstract
e.g: Most people like to swim in summer, but some are fond of swimming in winter.
"in the summer" - specific
I will go to Beijing in the summer. = (in) this summer