Impersonating a police officer is never a good thing and can get you into trouble with the real police.
The actual seriousness of impersonating a police officer depends on what you actually did when impersonating a police officer.
For example if you just dressed up as a police officer and wrote someone some tickets for things then it may just be a misdemeanor if it's your first offense.
If you dressed as a police officer and then pulled someone over and tried to make an arrest then you could get a kidnapping or attempted kidnapping charge and if you pulled a gun on that person when making the stop then you could get into more serious trouble.
I've heard of a few cases where someone was impersonating a police officer and they just made a traffic stop and did no other harm to anyone.
They just got a few months in jail and a fine.
But the next time it happened they would likely go to prison for at least 5 years.