Generally speaking, a hitter will struggle against pitchers of the same hand (righty vs righty or lefty vs lefty). The reason is that the most common breaking balls (curveballs and sliders) will break away from the hitter. It's easier to hit the ball if it's moving towards you, which is why a righty hitter usually has the advantage over a lefty pitcher and a lefty hitter over a righty pitchers. Also, it's usually easier for a hitter to see a ball being thrown by a pitcher of the opposite hand.
This is why you see a lot of players who throw right handed but bat left handed (or are switch hitters). There are more right handed pitchers and batting left handed against them is to the hitters advantage.
But like I said, that's speaking very generally. It depends on what pitches a pitcher throws. For example, a right handed pitcher with a great change up will usually have better success against left handed hitters since change ups tail away from a lefty hitter.
And there's also pitches such has a cut fastball, which is more effective against a hitter of the opposite hand even though it moves towards the hitter because it jams the hitter. That's why every once in a while you'll see a switch hitter bat right handed against someone with a great cutter, such as Mariano Rivera.