What legal actions would be taken against a drone pilot if they flew a drone into class B airspace?
The answer is somewhat unclear, as there is limited (but emerging) case law and regulation on the subject and the outcome would depend heavily on the details of the airspace violation. However, there are some principles that we can use to shape our understanding:

The FAA has jurisdiction over anything flying, including UAS

This was most recently restated in the NTSB decision in FAA v. Pirker. Combine the definition in FAR 91.1: "Aircraft means a device that is used or intended to be used for flight in the air" with the Applicability section in FAR 91.1(a):


  ...[T]his part prescribes rules governing the operation of aircraft (other than moored balloons, kites, unmanned rockets, and unmanned free balloons, which are governed by part 101 of this chapter, and ultralight vehicles operated in accordance with part 103 of this chapter) within the United States including the waters within 3 nautical miles of the U.S. coast. 


We see then, that anything flying is regulated - either under part 91, 101, or 103. Since UAS are not regulated under part 101 or 103, they fall under Part 91. Finally, the FAA has authority to impose a civil penalty for violations of the FARs under 49 U.S. Code § 46301. Note that an FAA certificate is not necessary for the FAA to assess a civil penalty: in the Pirker case, the FAA assessed its penalty on a Swiss citizen who did not hold a FAA certificate.



Finding the operator of a UAS is difficult

Finding the operator of a UAS is much harder than finding the operator of a piloted aircraft. The FAA was able to find and assess a penalty to Raphael Pirker because he posted a video he made flying the UAS online. In most situations where UAS were where they shouldn't have been, the operators either were never found or turned themselves in:


UAS crash-landed on the White House grounds
UAS interrupts wildfire-fighting activity - a reward was offered for identifying the operator
UAS reported by pilots on approach to KJFK


Basically, if you're flying a UAS far enough away from yourself that a police officer can't see the remote in your hands, you're unlikely to be found if just your UAS is detected. UAS for personal use do not currently require registration or external markings. A recent research project proposes a tracking system - but would require "affixing radio-frequency detection tags to [UAS]."



Actual enforcement would vary

After all of that, what would happen if you did violate controlled or restricted airspace and were caught? This area is pretty fuzzy, and would depend strongly on a number of criteria, including severity and intent. The FAA's toolbox for airspace violations is broad, but is generally tuned toward certificated pilots. A certificated pilot who accidentally entered class B airspace might get anything from a slap on the wrist, to a required training session with an instructor, to a short-term suspension of their certificate, based on the situation: an overwhelmed or confused pilot would get more leeway than one who just wasn't paying attention or was reckless in their navigation.

Suspension and required training are not really in the FAA's toolbox for folks without a certificate, so you likely would expect some sort of monetary fine. The FAA is limited to $10,000 in its fines, so you could not be charged more than that, and could well see something less. 



Prevention is the best cure

Some UAS manufacturers are building in safety restictions on their aircraft to prevent them from flying near airports (note that, at least in the linked situation, the restricted areas are less restrictive than B airspace, so would not necessarily keep you out of that airspace.)

The FAA is also working on a mobile app which should easily allow UAS operators to determine areas to avoid. This is relevant to the enforcement situation: if you enter airspace without clearance, but the app said it was OK, that would be a mitigating factor. More to the point, the app would provide information about the status of nearby airspace, allowing you to avoid violation, and the associated penalty, altogether.