There is a 50% chance of this Pokemon's previously consumed Berry being restored at the end of the turn. If the weather is sunny, Harvest will always activate. The Berry consumed is remembered, so even if restoration fails or the wielder switches out, the effect may still activate at the next end of turn of being active. Harvest does not activate more than once per turn, so if the restored Berry is immediately consumed, Harvest will not trigger. No effect outside of battle.
Hope this helps.