In the time before classic books on orchestration by Berlioz and Rimsky-Korsakov had been written, how would a composer such as Mozart have been able to learn to write for orchestra?
As stated before, his father was a fine composer himself, especially a fine writer of orchestral serenades which were popular in Salzburg; some of Wolfgang’s early pieces were serenades and cassations, which were a variant of the Salzburg serenade. Other composers such as Michael Haydn were of use to Mozart for teaching purposes; many of Mozart’s earlier symphonies were demonstrations for his newfound knowledge like in K. 200, exchanging a more Italian finale in 6/8 rhythm for a faster presto finale similar to that in his famous Paris symphony K. 297.
But mostly, Mozart traveled, not only to gain a paying position, but to gain further knowledge. After becoming a member of the Academia Filarmonica in Bologna during the early 1770s, one can hear a noticeable change in style. It was when writing for the Mannheim orchestra for his opera Idomeneo in 1781 when his style really changed. Wind writing was more obbligato, and divisi violas were utilized, something Mozart only used while on his Paris trip.
So to conclude, Mozart’s knowledge of orchestration started by Leopold for the small Salzburg orchestra, relatively increased with early travels (and teachings from foreign and Salzburger composers), and skyrocketed after his journeys to Paris and Munich in 1778-81.
Well his father was a teacher. Also, he could study previous works such as Haydn's. Wikipedia gives some details: Mozart at Wikipedia