When were you planning this visit for? As suggestions may be different depending on what your dates are.
If you have not allready booked flights. You can consider flying into Orange County Airport which is much closer to Disneyland than LAX is.
You plan sounds fine so far, except Legoland is a pretty small park, im not sure you would need 2 days there. You could just go there for the day on your way to San Diego. You could easily spend 3 days in San Diego.
Usually a 2 or 3 day Parkhopper is recommended for a Disneyland visit since there is alot to see at both Parks.
A 3 day Parkhopper if purchased online only comes with 1 Magic Morning where you can get into select areas of the Park 1 hour before regular opening time. Even if you can only do a parital 3rd day, its usually worth it since a 3 day Parkhopper is only about $30 more than a 2 day Parkhopper.
The Mousesavers website is also a good resource for you in that they list current discounts on attractions for you such as Sea World, Zoo, Disneyland , Ect (they do not sell tickets)
Its a good idea to also post in the various City Forums you are thinking of visiting as they will be helpful in planning an itinerary as well as places to stay, ect.