The in-universe story
An early episode of the anime tells Meowth's backstory. He was a street cat who fell in love with a Meowth owned by a wealthy woman. She turned him down, saying she only liked humans because they gave her comfort and luxury.
He then hid in the attic above an old dance studio and learned to walk upright and talk by watching the ballet and speech classes below. When he confessed again, he was rejected a second time, this time for being strange. She ended up with a Persian who led a street gang, and Meowth eventually joined Team Rocket.
The real-world reason
One answer points out that a talking Meowth lets viewers follow Team Rocket's plans. He can also translate what other Pokémon say.
This is about the anime only. In the games, Pokémon do not speak this way.