I have been looking over a lot of different Pathfinder spells to see how I could use them cleverly and found the spell maze, which banishes a target for 10 minutes. Can a creature (like the spell's caster) that's the subject of this spell, instead of trying to escape, use this maze time to, for example, apply buffs or summon an army?
A creature can do what it wants while affected by the spell maze, including trying to escape
A creature doesn't have to, but it may try to escape the maze effect:
Each round on its turn, it may attempt a DC 20 Intelligence check to escape the labyrinth as a full-round action.
That is, the option to make an escape attempt is available in addition to whatever the creature could normally do. This is further supported later in the spell's description:
Spells and abilities that move a creature within a plane, such as teleport and dimension door, do not help a creature escape a maze spell, although a plane shift spell allows it to exit to whatever plane is designated in that spell.
This strongly suggests that, instead of trying to escape by making an Intelligence check, a creature can do other things like, for example, cast spells (including the spell plane shift to escape). Note that, while affected by the spell maze, the creature is in an extradimensional space, and this may limit the creature's options.
Summoning while in the labyrinth
Through Dungeons and Dragons, Third Edition, the spell maze actually created the extradimensional space and the labyrinth of force then banished the subject creature there.
Dungeons and Dragons 3.5 (and, subsequently, Pathfinder) has the maze spell, instead, only banish the subject to an extradimensional labyrinth dimension (rather than creating the labyrinth for the subject). It's likely, then, that, for example, creatures summoned by a banished subject remain in the labyrinth dimension until they can escape on their own.
Previous versions of the spell maze were more... confining
In case there's some lingering confusion due to prevision versions, some older versions of the spell maze from Pathfinder's antecedent Dungeons and Dragons did, in fact, restrict a creature affected by the spell maze from doing anything but experiencing the labyrinth or trying to escape. For example:
The Player's Handbook (1978) for Advanced Dungeons and Dragons has this as part of the description of the spell maze:
The recipient will wander in the shifting labyrinth of force planes for a period of time which is totally dependent upon its intelligence. (90)
Emphasis mine. (It should be known that I have always interpreted this as the affected creature being restricted to just wandering, but another DM may interpret this differently.)
The Player's Handbook (1995) for Advanced Dungeons and Dragons, 2nd Edition subtly changed the AD&D spell's description:
The subject vanishes into the shifting labyrinth of force planes for a period of time which is dependent upon its Intelligence. (241)
Emphasis mine. Yet, in the Dragon #170 Sage Advice column, the Sage addresses this issue head-on:
The spirit of the spell description suggests that the nature of the labyrinth created by the maze spell prompts the victim to escape as soon as possible, and that no actions other than escape are possible while a victim is within. The victim can try a spell to get out, but he cannot do anything that does not contribute directly to escape.
It wasn't until the maze spell appeared in the Player's Handbook (2000) for Dungeons and Dragons, Third Edition that a creature could—absolutely and without risking violating the spell's letter or spirit—do something other than try to escape the effect of the spell maze, that version of the spell having much the same text as the Pathfinder spell does now.
Yes. On the creature's turn it may make an intelligence check to escape the labyrinth, but it does not have to. It still gets a turn and can cast whatever it would like during that time, barring any extra-dimensional limitations that may be placed on the creature. The question is, why would you want to use the spell in this way? The duration is 10 minutes if you don't attempt the check, making it not very useful for a safe-haven to buff yourself within, especially when there are lower level spells that can perform that same function. Then again, if you can cast this spell on yourself you probably have no problem hitting the DC 20 to escape the maze. I hope you don't roll a one.