San Diego, where it's located

The climate of San Diego is arid sub-tropical, with very mild, relatively rainy winters and hot, sunny summers. The city is located on the coast of California, in the far south-west of the United States, on the border with Mexico. Despite the low latitude (32 degrees north latitude), the climate is so mild, spring-like most of the year, because a cold current flows on the Pacific coast.
However, the temperature can increase a lot when the Santa Ana blows, the wind from the deserts of inland areas.
Here are the average temperatures at the Lindbergh Field International Airport.
San Diego - Average temperatures
Min (°C)9101213151719191816129
Max (°C)181819202022242524232118
Min (°F)485054555963666664615448
Max (°F)646466686872757775737064

Rainfall in San Diego is scarce, given that it amounts to just 260 millimeters (10 inches) per year, so it is at a semi-desert level. However, the rainfall pattern is similar to that of the Mediterranean climate, but with a drier autumn, since most of the rain falls from December to March, while in summer it hardly ever rains. The wettest month is February. Here is the average rainfall.
San Diego - Average precipitation

The amount of sunshine in San Diego is good all year round, but especially in winter, when the sun shines 75% of the time. The least sunny months are May and June, due to the morning fog that forms on the coast and in the neighborhoods up to about 15 km (9 miles) away from the coast (the phenomenon is called June gloom, even though it actually occurs in May and June, and sometimes in July). In total, there are 3,000 hours of sunshine per year. Here are the average sunshine hours per day.
San Diego - Sunshine

San Diego

Due to the aforementioned cold current, the sea in San Diego remains a bit cold even in summer: from July to October, the water temperature is of 19.5/20.5 °C (67/69 °F). Here is the average sea temperature.
San Diego - Sea temperature
Temp (°C)151515161718202020191816
Temp (°F)595959616364686868666461

In the inland areas, in the towns of San Diego county that in fact are part of the conurbation of the same city, the climate becomes more continental: winter nights are colder (sometimes the night minimum drops around freezing or even slightly below), while the days are warmer all year round.
Moreover, very hot days, with highs of 35 °C (95 °F) and more, are decidedly more frequent. In September 2010, 45 °C (113 °F) were reached (while at the international airport, the temperature didn't exceed 35 °C or 95 °F).
Here are the average temperatures at the Gillespie Field airport, near the town of El Cajon, about 28 km (17 mi) from the coast.
El Cajon - Average temperatures
Min (°C)6791114161818171396
Max (°C)212122232427303130272421
Min (°F)434548525761646463554843
Max (°F)707072737581868886817570

When to go

Having a great climate, San Diego can be visited all year round. However, from December to March, it can rain, and it can get a bit cold at night, especially in inland areas. In May and June, there may be morning mists. In summer, but especially in September and October, there can be very hot days, when the wind blows from the desert.
The best time to go to the beach is from July to October, when the sea is less cold.