The happiness of your Pokémon is an extremely important factor. How much happier your pokémon is, stronger your attacks are, if a Pokémon is sad, his attack is much weaker than it should be.
Never let your Pokémon sad. To make him happy, you should always feed him when he asks for food, he gets upset quickly.
Other factors that increase the happiness of your Pokémon, you win battles and use the 'affection'.