For a first firearm, as mentioned already, you really need to look at what you want to do with the firearm--is it going to be a hunting tool, a defensive tool, or do you kind of want it to fill both roles? Are you looking at a pistol or a rifle? Is it for hunting only? Is it the behind the door when strangers come knocking tool? While a firearm will do both things well, there are weapons that do one better than the other.
A defensive firearm. They fall in to the category of "black rifles", the AR, AK, FN/FAL, CETME, HK-whatever and clones. The primary purpose of the firearm is simply the defense of the family. While you can hunt with an AR or AK if needed, the round was not really designed for that task. The advantages of the black rifle are that they come in small packages (most have a 16 inch barrel) collapsible or folding stocks and they hold many, many rounds. They can be dressed up with all kinds of optics and do-dads and generally made to look like a space gun out of your favorite sci-fi movie. You'll get a lot of answers for the best rifle in this category, but the truth is that a defensive rifle needs to accomplish some very basic things.
1) It needs to be magazine fed. That is DETACHABLE magazines. There are people who will say that the M94 lever action is a good defensive rifle. In it's day it was. Today, it is slow, the action is complected and your ammo choices are either hunting rounds or pistol rounds. Detachable magazines are hell and gone better for getting back into action fast and laying down lots of rounds when suppressive fire is needed. And if you're the only one defending the home, suppressive fire might be the only option you have. Have lots of magazines. Magazines are consumables, they will get damaged and dropped, have enough to see you through the fight.
2) It needs to be able to sport good optics, like a sturdy red dot or similar sighting system, AND have back up iron sights (BUIS) Red dots and their ilk are far superior to any other combat distance sighting systems. Iron sights are a must for when the dot goes down, or you have to take that extra long shot and they need to be regulated for distances beyond 100 meters.
3) Have a good sling. This goes for any shoulder fired weapon. I'm talking about a good two or three point system, not a hunting sling. Some guys like the single point, but I am stuck on the two point system.
4) Get training with it. There is no substitute for training, other than practicing the training you get. Look around for reputable trainers and spend the money on it. I'd pimp my training company here, but that would be wrong. (
MilCopp Tactical: Ohio based Training)
5) Have the rifle in a caliber that you are comfortable shooting all day, with precision shots and rapid fire. If you are hammered in the first 20 minutes at the range shooting your rifle, it is not a good defensive rifle. There are many people out there who will tell you that the .308 is the only way to go. I am not one of them. I like the .308, I have a black rifle chambered in that caliber, but it is not a primary defensive weapon. It is a secondary, defend the castle weapon. The 5.56 has so much going for it as a defensive round it's not even funny. with less interior wall penetration than a 9mm and better down range ballistics than a Pistol Caliber Carbine (PCC) in the same sized package, the 5.56 bests them hands down. The 7.62x39 is another great round for defensive shooting and with the cost of ammo these days, it's a little more affordable than an AR. The draw back to the x39 is that there are no (substantial) domestic ammo manufacturers for the round and so you are stuck with very basic loadings for the rifle, unlike the .223/5.56, which has specialty rounds out the bum.
Those are just a few of the things that you need to think about in a defensive rifle. I run an AR15 with a 16" barrel, collapsible stock, EoTech and BUIS with a two point sling. A good AK system will work as well, we train people on both systems.
As for hunting rifles--what do you want to hunt, you're only limited by your budget. That's a thread all its own, really.
Shotguns for defense.
I'm of the "a rifle is better" camp. I have a defensive shotgun, I keep it in the safe. It's got synthetic stocks and ammo carriers and extended tubes, and even with all that, it still doesn't beat a good rifle. You see, shotguns, even the one with extended tubes, rarely hold more than a revolver in a bigger package that shoots a more punishing round. A defensive shotgun should be run solely with buckshot. Forget all the crap about birdshot and slugs and the rest. 00 buck should be in the tube and nothing else. 00 buck, and only 00 buck, not birdshot, has the penetration needed for defensive shots on a target, even at defensive distances. IF you need to fire that weapon further, you need to have something that will carry its energy down range and birdshot will not do it. 00 buck is the defensive ticket. While I do train people to swap out slugs for distance shooting, slugs should be a considered specialty round for defensive shooting. You should use NO other type of rounds. Not Less Than Lethal, not birdshot, not anything other the 00 buck. There are various reason for this, but for this post, just trust me. 00 buck.
I could ramble on, but I've done enough damage, I'm going for a run now.