During the "Ice Ages" or "Snowball Earth" times, where was all the energy?
I'm not quite sure if the question is asking about glacial, ice ages, or snowball Earth, and whether it's about the onset or end of a glacial period. I'll try to hit all three.
Ice Ages and Milankovitch Cycles
Ice ages are long spans of time that marked by periods of time during which ice reaches far from the poles, interspersed by periods during which the ice retreats (but never quite goes away). The periods of time during which ice covers a good sized fraction of the Earth are called glacials; the periods during which ice retreats to only cover areas in the far north and far south are called interglacials. We are living in ice age conditions, right now. There's still ice on Antarctica and Greenland. We are also in an interglacial period within that larger ice age. The current ice age began about 33 million years ago while the current interglacial began about 11,700 years ago.
The Milankovitch cycles determine whether the Earth is in a glacial or interglacial period. Conditions are right for ice to form and spread when precession puts northern hemisphere summer near aphelion and winter near perihelion and when both obliquity and eccentricity are low. The Earth currently satisfies the first of those conditions, but obliquity and eccentricity are a bit too high. That makes our northern hemisphere summers are a bit too warm, our winters a bit too cold.
The Milankovitch cycles] provides several answers to the question &quot;where does the energy go?&quot; Those times when conditions are ripe for glaciation have energy in the northern hemisphere spread more uniformly across the year than times not conducive to glaciation. Summers are milder, which means accumulated snow doesn't melt as much. Winters are milder, which means more snow falls.
Once ice does become ubiquitous, another answer to the &quot;where does the energy go&quot; question is into space. Ice and snow are white. Their presence reduces the amount of sunlight absorbed by the Earth.
The first paper listed below by Hays et al. is the seminal paper that brought the concept of Milankovitch cycles to the forefront. The second paper by Abe-Ouchi et al. dicusses a recent climate simulation that successfully recovers many salient features of the most recent glaciations. Most importantly, this paper appears to have solved the 100,000 year mystery and shows why deglaciation operates so quickly.

Hays, J. D., Imbrie, J., &amp; Shackleton, N. J. (1976, December). &quot;Variations in the Earth's orbit: Pacemaker of the ice ages.&quot; American Association for the Advancement of Science.
Abe-Ouchi, A., Saito, F., Kawamura, K., Raymo, M. E., Okuno, J. I., Takahashi, K., &amp; Blatter, H. (2013). &quot;Insolation-driven 100,000-year glacial cycles and hysteresis of ice-sheet volume.&quot; Nature, 500(7461), 190-193.
Icehouse Earth vs Greenhouse Earth
The Earth's climate appears to have been toggling between two climate extremes for much of the Earth's existence, one where things are cold and ice is likely to form and the other where ice is absent worldwide except maybe right at the poles. Dinosaurs roamed the arctic and Antarctica when the Earth was in one of its greenhouse phases. The Earth has been in a greenhouse phase for most of the Earth's existence.
Milankovitch cycles don't cause glaciation during greenhouse Earth periods. Ice ages happen when the Earth is in an icehouse phase. What appears to distinguish greenhouse and icehouse phases are the positions and orientations of the continents. Having a continent located over a pole helps cool the climate. Having continents oriented so they channel ocean circulation in a way that keeps the ocean cool also helps cool the climate.
The Earth transitioned from its hothouse mode to its icehouse mode 33 million years ago or so. That's right about when two key events happened in the ocean. Up until then, Antarctica was still connected to both Australia and South America. The separation from Tasmania formed the Tasmanian Gateway, while the separation from South America formed the Drake Passage. This marked the birth of the very cold Southern Ocean, it marked the buildup of ice on Antarctica, and it marked the end of the Eocene.

Bijl, P. K., Bendle, J. A., Bohaty, S. M., Pross, J., Schouten, S., Tauxe, L., ... &amp; Yamane, M. (2013). &quot;Eocene cooling linked to early flow across the Tasmanian Gateway.&quot; Proceedings of the National Academy of Sciences, 110(24), 9645-9650.
Exon, N., Kennett, J., &amp; Malone, M. Leg 189 Shipboard Scientific Party (2000). &quot;The opening of the Tasmanian gateway drove global Cenozoic paleoclimatic and paleoceanographic changes: Results of Leg 189.&quot; JOIDES J, 26(2), 11-18.
Snowball Earth and the Faint Young Sun Paradox
Snowball Earth episodes were not your average ice age. Ice typically doesn't come near the tropics, even in the worst of ice ages. Snowball Earth means just that; the snow and ice encroached well into the tropics, possibly extending all the way to the equator.
The problem with snowball Earth isn't explaining where all the energy went. The real problem is explaining why the ancient Earth wasn't in a permanent snowball Earth condition, starting from shortly after the Earth radiated away the initial heat from the formation of the Earth.
The solar constant is not quite constant. While it doesn't change much at all from year to year, or even century to century, it changes a lot over the course of billions of years. Young G class stars produce considerably less energy than do middle aged G class stars, which in turn produce considerably less energy than do older G class stars. When our Sun was young, it produced only 75% or so as much energy than it does now.

Image source: http://en.wikipedia.org/wiki/File:Solar_evolution_(English).svg.
By all rights, the Earth should have been completely covered with ice. The young Sun did not produce enough energy to support open oceans. This obviously was not the case. There is plenty of geological evidence that the Earth had open oceans even when the Earth was quite young.
This 40 year old conundrum, first raised by Carl Sagan and George Mullen, is the faint young Sun paradox. There have been a number of proposed ways out of the paradox, but none of them quite line up with the geological evidence.
One obvious way out is that the Earth's early atmosphere was very different from our nitrogen-oxygen atmosphere and contained significantly more greenhouse gases. The amount of greenhouse gases needed to avert a permanent snowball Earth is highly debated, ranging from not much at all to extreme amounts. Another way out is a reduced albedo due to the significantly smaller early continents and lack of life. The young Earth would have been mostly ocean, and ocean water is rather dark (unless it's covered with ice). Lack of life means no biogenic cloud condensation nuclei, which means fewer clouds.

Goldblatt, C., &amp; Zahnle, K. J. (2011). &quot;Faint young Sun paradox remains.&quot; Nature, 474(7349), E1-E1.
Kienert, H., Feulner, G., &amp; Petoukhov, V. (2012). &quot;Faint young Sun problem more severe due to ice‐albedo feedback and higher rotation rate of the early Earth.&quot; Geophysical Research Letters, 39(23).
Rosing, M. T., Bird, D. K., Sleep, N. H., &amp; Bjerrum, C. J. (2010). &quot;No climate paradox under the faint early Sun.&quot; Nature, 464(7289), 744-747.