You may activate mana abilities (for example the mana abilities of lands) whenever you may activate other, non-mana abilities, in addition to when you pay a mana cost.
Most mana-generating permanents, including most lands, have an ability that says something along the lines of "Cost: Add mana", where "cost" is usually the Tap cost. Those are mana abilities:
605.1a An activated ability is a mana ability if it meets all of the following criteria: it doesn't require a target (see rule 114.6), it could add mana to a player's mana pool when it resolves, and it's not a loyalty ability.
Activated mana abilities are a special case of activated abilities. You can activate a mana ability whenever you could activate a regular ability:
605.3. Activating an activated mana ability follows the rules for activating any other activated ability (see rule 602.2), with the following exceptions:
One key difference between mana abilities and regular activated abilities is that you can activate mana abilities whenever you have to pay a mana cost.
In a nutshell, you may tap lands etc. for mana whenever you could cast spells and activate abilities, including during your opponent's turn.