Are summons random?
You're right, there are certain conditions, which is often based on environment, depending on which Astral it is. Here's an excerpt from a guide:
Titan: Chance increases with number of fallen allies. Can only be summoned in wide, open locations or flat terrains.
Ramuh: Chance increases with amount of time spent in battle. Can be summoned anywhere.
Leviathan: Can be summoned when Noctis is in trouble (during Danger status). Can only be summoned near bodies of water such as lakes or near the coast.
Shiva: Chance scales as the chances to summon all other Astrals increases. Can be summoned anywhere, given sufficient space.
Bahamut & Ifrit: Can only be summoned in the late game automatically.