They're two pretty different games. The first one has the graphics of a more traditional FPS, but is semi-open with hubs between levels.
The second replaces it with the cartoony visual style and is a lot more linear.
The first one has some emotional moments, arguably better than the ones in the sequel.
IMO, 2 is a better game and it isn't necessary to play the first one to understand it. If you have the money, you might as well get it as well as it is a great game.