Generally cool & dark is good, but it doesn't matter too much about the temperature as long as its generally constant, fluctuations in temperature can cause condensation & sweating especially if it's kept in a plastic wrapping.
Make sure it's not kept somewhere damp too, this can also cause mould to grow the same as sweating.
Hay kept in a paper bag, cardboard box or even an old duvet cover usually keeps better/fresher as it can 'breathe' (&more tidy).
Don't keep it in direct sunlight either as this will cause it to dry out & go brown, more spikey, 'straw like' instead of lovely sweet, soft, green hay- (also causing temperature fluctuations, especially on bright days/cool nights).
If you think about bales of hay on a farm, they're usually stacked together in a barn with gaps for airiation in the sides & a sturdy roof to keep it dry
X