I normally let the gel harden overnight, but is this necessary? Can I, for example, prepare the gel in the morning and load it with proteins in the afternoon?
The time you may need to let the gel harden will depend on the size of the gel and the room temperature; small gels are ready in about 15 to 20 min at 20 ºC, larger ones may need longer times, but I normally prepare them on the same day, just before using them. The resolution may not be affected too much, but in this way you will avoid the possibility of them getting dry over the night.
Like the other responders said, you can use the gel right always soon as they polymerize. However, based on personal experience, I prefer older gels to fresh ones; at least a day old. First, fresh gels seem to run more slowly than older ones, yet,and most importantly, bands usually look thicker, more diffuse and less well-defined than older one. Secondly, I believe resolution of proteins of different sizes are better in older gels too; you can test this out yourself. We store our gels in the fridge (not wrapped but) totally immersed in the running buffer and the container tightly closed to prevent the buffer from evaporating (it does disappear even in the fridge if left open for a long time). I will say up to about 3days is okay because when it stays there for about a week or more, the glass cassettes open by themselves and the gel can't be used.