When used as a generator, a motor can generate approximately the same power that it requires for operation as a motor at rated speed and torque.
In general, the voltage produced by a generator is directly proportional to speed. Power is proportional to voltage multiplied by current. The maximum current that can be drawn from a generator is generally a fixed value that is not determined by speed. Therefore the power that can be produced by a generator is directly proportional to speed.
The effect of changing the strength of the magnetic field (field excitation) is generally to increase or decrease the voltage generated.
There are a number of factors that determine a generator's limits for safe operation. Those factors are generally similar between motor and generator operation. They need to be considered for each different type of machine, AC and DC, wound-field and permanent-magnet, induction and synchronous, plus all of the sub-categories and design variations.