Bad things, if the temperature gets too high. But it takes a lot to make that happen. Thermal runaway is generally considered to be a serious risk at about 140 degrees fahrenheit. That means you're safe from spontaneous combustion pretty much everywhere except somewhere like a steel shed in the sunlight, or a hot car in the summer sun, or maybe a hot garage when its 110 outside. It definitely gets above 130 in the summer in my closed up Fresno garage.
There isn't much in the way of thermal management involved when the battery is living in a hot environment and it is just flat out going to match ambient temperature. Check this pic out:
View attachment 161536
That is me parked at Costco in Clovis CA in the summer (my insurance kicks in if the bike is locked to a secure object, so I take pictures at every stop). The bike has been parked in the sun, right next to a steel wall, for about a half hour. The wall is radiating heat, and so is the sun down on the bike, but the battery is under the floor. So the real risk is the heat radiating up from the concrete. I keep a temperature sensor at the top of the pack inside that sub-floor box and when its parked in the sun I can see temps in the box of up to 105 after I come back out after my shopping trip. On the way home, I do my best on the bike path to roll over shaded areas and this is good for about a 5-degree temperature reduction inside the battery box. Look closely and you can see some heat sinks just behind the front wheel that are on three sides of the box and are good for about 3 degrees temp reduction while moving thru even hot air.
Since I have a temp sensor I use in real time, and I *know* how hot that pack gets, I don't shop mid-day. I will commute in 110-degree heat, but I won't park a bike outside in it.
The more practical question is how hot does it have to be to hurt the battery's longevity? I've heard the number to be 'over 100 degrees fahrenheit' but I don't generally want to push it that far - if I can help it.
@teskow 's 85-degree limit is a good one if you want to ensure your battery investment doesn't die younger than it has to.