Yes, of course. No one is asking you to change your hairstyle for a student ID photo. Just make sure that the bangs do not obscure your eyes. Ideally, they shouldn’t hang lower than your eyebrow line. Long “emo” bangs should be combed back.