"How old are you?" is the English translation for "你几岁了".
If you're asking someone how old they are, it's important to be respectful and considerate of their privacy. You can ask in a casual or formal setting, depending on the relationship you have with the person. If you're unsure about their age or if they prefer not to share that information, it's best to respect their wishes and avoid the question altogether.