Sometimes, you can only sue a person in federal court -- such as when the underlying issue arises under a federal statute that confers jurisdiction only in federal courts. This is called a "federal question," and the residences of the parties don't matter.
The only way a person can sue another person in federal court (not arising from a federal question) is when there is DIVERSITY OF CITIZENSHIP AND MORE THAN $75,000 IS DEMANDED IN THE COMPLAINT.
Diversity of citizenship means that the plaintiff and the defendant are citizens of different states. If more than two parties are involved, none of the plaintiffs can reside where any of the defendants do. So if A and B are plaintiffs, and Y and Z are defendants, neither A nor B can reside in a state where either Y or Z lives. A and B can (but don't have to) live in the same state and sue together, so long as Y or Z doesn't live where either A or B does.
The AMOUNT IN CONTROVERSEY IN A DIVERSITY ACTION (WHERE PARTIES RESIDE IN DIFFERENT STATES) must be at least $75,000.00, exclusive of interest or costs.
If there is not full diversity -- one of the plaintiffs lives in the same state as one or more of the defendants), the court will not have jurisdiction -- the power to hear the case. The sane thing holds if the amount in controversey is less than $75K, exclusive of interest or costs.
Bringing suit in federal court is tricky - in NY State, there are four different federal district courts. You have to sue in the right one.
Consult an attorney before you bring such a suit -- and make sure that the lawyer is admitted to practice in the federal district court where your action should be brought. That is different than being licensed by a state.