Air conditioning is needed more on transport than in homes. Just look at how warm it is on the London Underground. Only now, with the introduction of the S Stock, is air conditioning being introduced.
I remember reading once (for Physics I think) that each person gives out as much heat as a 100w heater. So if a carriage has 100 people in it (say 70 seated and 30 standing), that's 10,000 watts of heat. And the people standing will probably give off more heat because their muscles are doing more work. Then you have to factor in the heat from the sun on the windows, the heat if the train has been sat in the sidings with the windows shut as mentioned above, and the temperature will rise very quickly, particularly if the train is stationary.
Are window openings smaller on trains today vs older designs? This will also make a difference.
As well as this, air conditioning can be used in reverse to heat a room in a house (it's called a heat pump). I don't know whether this is used on trains (I think it is on some at least, can anyone confirm this?), but using this would reduce the need to heat the train using electricity (heat pumps don't work very well below 0 degrees, so a back up will still be needed), so the expense of air conditioning could save money in the long run.
As a final note, I was surprised how quickly the car warmed up when I was with my Grandparents the other day. I was sat in the back with the door open and my sister and Grandad were also in the car. We were waiting for my Grandma. When she was locking the door, I closed the car door and the heat levels rose almost instantly. It just shows how quickly the heat can rise in a car, bus or train with no ventilation. There were only three people in the car, there might be 100 in a carriage.
I suppose people coped before, but everyone must have been used to it then. I'm guessing Global Warming has also had an effect and made temperatures a bit warmer?