Infamous: Second Son takes place seven years after the events of Infamous 2, and during those years the United States formed a Department of Unified Protection (DUP) in order to imprison Conduits (who are branded "Bio-terrorists").
However, I don't see how this could have come about with either of the two endings for Infamous 2 (good or evil).
If Cole chose the good ending in Infamous 2 then that means he
activated the Ray Field Inhibitor (RFI), which ended the Ray Field plague but also killed himself as well as many (all?) other Conduits. The ending specifically mentions that Conduits overseas were killed by the RFI (which is shown emitting a blast that can be easily seen from space), even if they didn't realize they were Conduits (presumably because they had the Conduit gene but it hadn't been activated by a Ray Sphere).
This suggests that
all people with the Conduit gene were killed, which means there would be no Conduits left to imprison after Infamous 2.
On the other hand, if Cole chose the evil ending in Infamous 2 then that means he
destroyed the RFI and became The Beast. It seems impossible for non-Conduits to win a war against Cole plus all the other Conduits and imprison most of them by the events of Infamous: Second Son only seven years later (especially with no RFI to stop the Conduits). Moreover, non-Conduits would also die off due to the Ray Field plague yet the plague does not seem to be a problem in Infamous: Second Son.
Either way, it doesn't seem possible for non-Conduits to start imprisoning Conduits in the years between Infamous 2 and Infamous: Second Son. Which Infamous 2 ending is canon (good or evil), and how did that ending result in the state of affairs in Infamous: Second Son?
Source for the hidden image above, and video of the Infamous 2 good ending (starting at 2:58:27):