Well it can raise the affection of the Pokémon towards you. This is achieved by petting the Pokémon, feeding it and playing games with it. You can feed it Poké Puffs, which come in many shapes and colours, and usually the fancier ones will give more hearts towards leveling up affection which is measured in a five-heart scale. Said Poké Puffs are rewards from playing games, with harder difficulties giving better puffs. Your score is also a factor. Playing games burns food given to your Pokémon, so if it's full (turning its head when attempting to feed it), playing some games enable you to feed it more.
Petting it also raises affection, but after a while, instead of hearts, a speech bubble with a musical note will appear, which means further petting will have no effect at that time, it would rather play.
As for the effects: the Pokémon whose affection is higher might display a text when entering battle, like 'your familiar smell is comforting to it' and such. But better yet, these Pokémon might earn boosted experience points, shrug off status conditions (all of them I think), avoid attacks, deal critical strikes and survive an otherwise fatal blow occasionally. Some even evolve with high friendship. To reach the fifth heart after the fourth, you need to level it twice.
Hope this helps.
Most stats of event Pokemon are pre-determined, set by the event itself. So, all event Torchics are indeed male. Depending on the event, Nature can be preset although it wasn't the case with the Torchic event.
As for other Pokemon, we cannot know for sure as no event Pokemon have been released. As for wild Pokemon, of the new ones released in X/Y, only the Flabebe line has a mono-gender distribution, being 100% female.
Best Answer
Barring a bug, hack or you simply being mistaken, evolution never changes gender, nor does anything else.
Gender, IVs, ability (barring the ability swap item), and personality are set in stone on generation of a pokemon and are never deliberately changed by game code in any generation of Pokemon (though trading from Gen 1 to Gen 2 assigns previously genderless pokemon a gender based on personality value).