Florida's open container law while driving is pretty specific in regard to your situation. Your friend having a beer in the passenger seat is against the law, and it is considered a noncriminal moving traffic violation, which means that you can be fined and have points assessed against your license. Depending on how bad your circumstances are, you may be charged with a misdemeanor and fined up to $500 and even face some jail time, depending on what county you're in.
Technically, the open container law in Florida seems to indicate that a driver cannot be issued a ticket for a passenger with an open beer; however, I would recommend that you stay on the safe side and not test it. More than likely, if you are pulled over and there is an open container in the car, it is not going to matter who is holding it because the officer will give you both tickets, and let you fight it out in court, which will cost money. In addition, this may persuade the officer to begin a DUI investigation of the driver, which is no fun.
Additionally, in some Florida cities, you don't even have to be in a car--you can't have an open container of alcohol in any public place such as the street, sidewalk, or public parking lots.
Florida open container statute 316.1936 states that an "open container" means any container of alcoholic beverage which is immediately capable of being consumed from, or the seal of which has been broken. Therefore, you do not have to put your unopened wine in the trunk if the seal has not been broken.
The law indicates that it is unlawful to possess an open container while operating a vehicle or while a passenger in or on a vehicle. The statute further indicates that "an open container shall be considered to be in the possession of the operator of a vehicle if the container is not in the possession of a passenger and is not located in a locked glove compartment, locked trunk, or other locked non-passenger area of the vehicle." Further, "an open container shall be considered to be in the possession of a passenger of a vehicle if the container is in the physical control of the passenger."
Florida's "open container" law is found in Section 316.1936, Florida Statutes. An "open container" means any container of alcoholic beverage which is immediately capable of being consumed from, or the seal of which has been broken. It is unlawful for either a driver or a passenger in a vehicle to possess an open container whether the vehicle is in operation or parked or stopped on or at the side of a roadway. An open container is considered to be in the possession of the driver if the container is not in the physical control of a passenger and is not locked up in the glove compartment, trunk, or other non-passenger area of the vehicle. The only exception to this law for passengers is in vehicles designed or maintained to transport people for hire (e.g., limos, party buses) or in motor homes over 21 feet long.
To answer your specific question, if your passenger is hugging his open beer tightly or is in the back seat with it, you as the driver probably won't be cited, but your passenger will. On the other hand, if your passenger puts his beer in the cup holder between the two of you, you'll have some explaining to do, and at best you can expect to walk the line and waste an hour or two you'll never get back. Police will generally overlook the bottle of wine or liquor in the grocery bag on the back seat of the floor if the seal is not broken, but using the trunk is your only guaranty of avoiding trouble. Even though the penalty for driver or passenger is just a fine up to $500, cities and counties are specifically authorized to pass their own open container ordinances that could include criminal penalties including jail.
The bottom line is, to avoid a hassle for both you and your passengers, don't allow any open beer, wine, or liquor in your car, and try to keep alcohol containers in the trunk or some other inaccessible place in the vehicle when transporting them. If your passengers feel compelled to drink in your vehicle, you’d better be completely off any road, alley, parking lot, or other place where cars normally operate, which will probably limit you to back yards and cow pastures. It's all part of society's way of saying drinking and driving definitely do not mix, even if you're a passenger, and you can avoid a whole lot of problems, including the death or dismemberment of your friends and family, by keeping the booze at home.