If I were staying in Munich, near the Hauptbahnhof, I would prefer the S-Bahn to the airport. There is a single platform in the Hauptbahnhof tief (S-Bahn) station, and the trains to the airport come every 10 minutes on average. The S1 to the airport will be on track 2, Richtung (direction) Pasing. The S8 will be on the opposite track, 1, Richtung Ostbahnhof. Just take the first one to the airport, regardless of direction. Just stand on the platform and watch the overhead arrivals sign. 60% of the time, the next one will be the S8, and it will take 40 minutes.
The trains almost always run on time. In the morning, during rush hour, the buses can be delayed in traffic. (Note, the bus website says it take approx. 45 minutes to get to the airport from the Hbf, but the schedule allows 1h10min from the Hbf until the bus departs from the first stop at the airport.)
The bus fare is 10,50€ adult/ 5,50€ child, 6-14 years, no group discounts. If you have 3 adults that's 31,50€; if one's a child, it's 26,50€ for your party. An MVV Partner Gesamtnetz Tageskarte will cover up to three people (up to 5 actually) to the airport for 22,30€.
If you are arriving at the airport and coming into town, the MVV Tageskarte will also cover all of your travel by an MVV conveyance in Munich for the rest of the day.
The bus has an advantage timewise, but not pricewise, if you are staying in Schwabing North, near the Englischer Garten. The bus stops there on it's way to/from the airport.