Los Angeles travel is excellent pretty much throughout the year. While there are some seasonal differences in the weather, the overall climate is Mediterranean and relatively pleasant most of the year. Additionally, the weather patterns are notoriously unpredictable. When to go to LA for the best time on the beaches is during the long summer, which begins in April and continues through September. But you might show up in the dead of winter, and find days on end of beautiful 85 degree temperatures and clear sunny skies. You may come in September to days of overcast skies and nonstop rain, or there might be a 100+ degree heat wave. Virtually all things to do and attractions in the city are open year-round, so the best time to go to Los Angeles really depends much more on what is the most convenient for you.
Even if your Los Angeles travel is obligatory and you don't have a choice of when you visit, be sure to check the calendar for the time of your visit for some of the many special events that seem to be occurring constantly. It might be a home game of the Lakers at the Staples Center or one of the city's baseball teams at Angel Stadium or Dodger Stadium. All of these sports venues are also concert locations, and the best time to go to Los Angeles for attending a musical performance is when the home team is traveling to away games or during their off season.
When to go to LA if you're interested in skiing is during the North America winter. Yes, this famous beach and surfing destination does have skiing. The city is surrounded by mountains, many of which are within the city limits. Some of the ski resorts open in the early autumn and don't close until late spring. During the winter in the higher elevations, your Los Angeles travel will also reward you with cross country and snowmobiling trails. During this time, it's possible to go skiing and go surfing within the same day.
Something else that might surprise you is the rather astonishing amount of true wilderness right in the midst of the city's urban sprawl, as rugged mountains and canyons dot the LA Basin, often running dramatically right up to the beaches. The best time to go to Los Angeles to enjoy even these wild places is pretty much all year. There is hiking, horseback riding, groomed jogging trails, and a plethora of wildlife to enjoy. Wild denizens include coyotes, bears, mountain lions, deer, and numerous raptors. There are pockets of marshland that are protection zones for water birds.
The Sepulveda Dam area with Balboa Park in the San Fernando Valley is one. It sits right next to the busiest civil aviation airport in the world and is a tranquil natural area with egrets, herons, storks, ducks, geese, and similar birdlife. It also boasts an elegant formal Japanese garden and authentic tea house. Virtually in the middle of Beverly Hills is the Santa Monica Mountains National Recreation Area. Will Rogers State Park pills right into Pacific Palisades. This rugged canyon and mountain park is adjacent to Topanga Canyon State Park and Malibu State Park. These, in turn, are adjacent to other state parks and recreation areas, creating a vast wilderness within a 20-minute drive of Hollywood. Running through it all are the extraordinary scenic vistas available on Mulholland Drive, Mulholland Highway, and the historic Camino Real (the "Royal Way" from Spanish colonial times). The only time to avoid these areas is during the height of the fire season and during particularly heavy rains when there can be landslides.
As far as when to go to LA to avoid the biggest crowds, remember that summer is the peak travel season for the beaches and the things to do involving the major tourist attractions. Major events also draw crowds. But the city is large enough that you can easily avoid these spots, unless you've come specifically to enjoy them. If you've come for a baseball game at Dodger Stadium or a basketball game at the Staples Center, you might want to consider public transportation. If you've come for the all-night Halloween party in West Hollywood, you might want to consider one of the hotels in the neighborhood so that you can walk to everything.