Concerning the Earth, there is the well documented Nitrogen cycle based on flora. There are also other significant sources for nitrogen from inorganic processes.
Deep crust/mantle core sources for nitrogen: Nitrogen solubility in mantle minerals
Volcanic eruptions : Volcanic gas
Assuming the rock processes on Earth are also occurring on Titan and Venus, similar inorganic processes may be occurring on other worlds. I think it is a good educated guess even though we really have very very little hard evidence of rock processes other planets.
As for Mars, its thin atmosphere may indicate that is cannot hold onto $\ce{N2}$ and there may be very little $\ce{N2}$ currently being created on Mars.