This depends on the military that you are in. The American Marines just recently allowed french manicures so long as they conform to the standard on nail length that was already in practice. No other colour of nail polish is allowed
If you're Active Duty or Reserves on Active status, yes. If you're a Veteran, retired or otherwise, there are restrictions on when and where you can/should wear your uniform, typically dealing with...
Depending on the unit, military personel may have to wear a uniform when leaving post and when returning. Generally though, they are not required to be in uniform unless they remain on post.